I've got a form with some optional questions that should be shown/hidden based on another question.
If the user checks the "Do you want a second goal?" checkbox, then the Goal2 field should be displayed.
When the form loads, the Goal2 field is hidden, however, checking the "Do you want a second goal?" checkbox doesn't do anything - the Goal2 field remains hidden.
I've tried changing the "Do you want a second goal?" question to a Yes/No single choice field, but it still doesn't work.
I'm rendering the forms scripts using
@Umbraco.RenderMacro("RenderUmbracoFormScripts")
and they are being added to the page.
I can also step through the code in umbracoforms-conditions.js when the page is loaded.
It just seems that there should be some javascript or something that executes when the user checks/unchecks the "Do you want a second goal?" question, but that doesn't seem to be happening..
Conditions not working
I'm using Forms v7.0.1 with Umbraco v7.10.
I've got a form with some optional questions that should be shown/hidden based on another question.
If the user checks the "Do you want a second goal?" checkbox, then the Goal2 field should be displayed.
When the form loads, the Goal2 field is hidden, however, checking the "Do you want a second goal?" checkbox doesn't do anything - the Goal2 field remains hidden.
I've tried changing the "Do you want a second goal?" question to a Yes/No single choice field, but it still doesn't work.
I'm rendering the forms scripts using
and they are being added to the page.
I can also step through the code in umbracoforms-conditions.js when the page is loaded.
It just seems that there should be some javascript or something that executes when the user checks/unchecks the "Do you want a second goal?" question, but that doesn't seem to be happening..
I've got it working.
Views\Partials\Forms\Script.cshtml is referencing contour classes, but the javascripts are looking for umbraco forms classes.
Had to replace #contourform with #umbracoform
and replace .contour-page with .umbraco-forms-page
I think the problem is that we are using the Form Picker datatype to select the form and not the macro, and so no theme is being supplied.
The form seems to be rendered via the Themes\Form.cshtml, however because no theme is specified, it's using the non-themed Scripts.cshtml file.
I am just adding a note for my own sanity. This is v7.06 forms. In Views\Partials\Forms\Script.cshtml change:
and find and replace
is working on a reply...