Skip to main content

Posts

Showing posts from February, 2019

Sitecore Experience Forms Validation

Recently I was adding Sitecore Experience Forms (NOT WFFM) to some existing views I had. Sitecore provides a walk-through on how to set this up, however, when I set the page up as they noted when I clicked submit I was always sent to a URL like this:

http://<domain>/formbuilder?osa_did=C0020166&fxb.FormItemId=b41b7d6a-592c-415f-bb56-a9d7c803c148&fxb.HtmlPrefix=fxb.37b94ac0-596b-4b2d-999e-c9814ee8ff98

To try and resolve this I took a step back and approached this like I did not already have an existing view. So I created the base view like they call out in the walk-through. Then I created the layout view and set its base to the base I just created (the one that holds the references to the Sitecore script commands). When I did this the form worked! So I moved the same script commands to my existing view again, and the form stopped working and on click sent me to the "formbuilder". What!? I decided it was time to talk with Sitecore supported.

After talking it thro…

Variables for pipelines

I recently stumbled on a post about adding configuration variables to Sitecore pipelines. This is one of the coolest hidden features of Sitecore and its pipelines! As you build custom pipelines one thing you will probably encounter pretty quickly is the need to pass in a parameter that changed based on the environment the code is deployed into. This is where pipeline variables save the day.

The first thing you need to do is create a variable that will hold the data you want to pass into your pipeline processor. This variable can be udpated by your deployment process to hold the value you want in each environment.

<sc.variablename="mySites"value="mySitesValue"/>
Important: You of course want to create this variable in a patch file and not directly in any of the default Sitecore configuration files.

Next, you want to setup your pipeline configuration. This, of course, is also done by using a patch file.

1 2 3 4 5<processorsites="$(mySites)"patch:after…