2

I'm currently using the WFM module in Sitecore to display a form full of fields in sections.

I'm trying to do the following:

  • Use "Layout Rules" to show/hide a section of fields, depending on checkbox value

When I try to use the Layout Rules on the section I want to hide/show, it doesn't seem to be working (everything is showing).

I've put in the following logic:

  • NEW CONDITION
  • where HotelAmenitiesCheckbox field IS NOT EQUAL TO 1
  • hide element

'HotelAmenitiesCheckbox' is a checkbox field in the form. I've set the name and DisplayName in Sitecore to be exactly what I've typed above.

Can anyone help explain which direction I need to go? This is frustrating with my limited knowledge of .NET and Sitecore's limited documentation.

Thanks in advance!

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139

1 Answers1

1

I have the same issue and haven't been able to find an out-of-box solution with the WFFM module so I came up with this workaround that leverages the Help field of a WFFM field to store a "line of code". I gave the marketers an if statement that they can write in the Help field and when the form loads on the front-end, there's some JS that parses that if statement and hides/shows fields that are dependent on each other. I asked this question just this weekend, and got a lot of help from the community here on Stackoverflow: Conditional Renderings with JavaScript Regex.

Community
  • 1
  • 1
DougCouto
  • 530
  • 1
  • 3
  • 18