Search code examples
sitecoresitecore8rule-engineweb-forms-for-marketerssitecore8.1

Show field based on another fields value using rules, WFFM, Sitecore8.1


I want to conditionally show a field in a web forms for marketers form in Sitecore 8.1.

My thoughts was that rules could be utilized to that. the only problem is that it seemingly does not work.

When I set a field to conditionally hide based on the value of another field, nothing happens when I satisfy the condition ie. enter the conditional value.

My intuition here is that the rule editor is not working on realtime on the form (by using JavaScript) but is only something that runs on the server.

Can anybody confirm this? Or otherwise send me the right direction towards realtime updating the form based on rules?

Greetings Mads Buch


Solution

  • You will require to use Javascript. What you can do is to create a custom rule which will be triggered via javascript. You can check the following link on how to create a custom rule https://jeffdarchuk.wordpress.com/2015/06/04/lets-use-that-rules-engine/

    Also, you may create a custom type as suggested in this thread.

    Thanks