Basically, in a previous version of Umbraco Forms (I think we started with v10.2 perhaps) there was an update to use the umbraco-forms-hidden CSS class instead of style="display: none;" for conditional groups and fields. Because I was using a custom theme, this was missed during an upgrade.
One other gotcha: I had to make sure that each field wrapper has @f.CssClass - this adds the appropriate fields for conditional showing/hiding too.
Thanks Karl, you pointed me into the right direction.
I had a custom theme for Umbraco Forms 11.1, and to make the conditional logic work in Umbraco Forms 13.0 I had to remove the style="display:none;" in Form.cshtml.
The umbraco-forms-hidden CSS class is set by calling @f.CssClass, so this is what is left in my view:
Umbraco Forms Conditions not working
Any Umbraco masters out there no why the condition fields don't seem to work in Umbraco forms.
I've tried them on 'Groups' and on individual fields with no joy. Either I'm missing something obvious or it's a bit broke.
We're running on Umbraco 10.5.1
Any help/tips would be appreciated.
Cheers
Hi Richard,
did you find a solution? We have the same issue
Thanks,
Alex
Hi Richard
Did you include the dependencies in frontend? https://docs.umbraco.com/umbraco-forms/developer/prepping-frontend/
Not neccessay jQuery, but the conditional fields require a bit of JavaScript to toggle the fields.
Hi
We are also getting the same issue and we have included the dependencies in the header but still the conditions doesn't work.
Anyone found any solution to that?
Thanks
I have also found this on 10.5.2 (non-jQuery approach), having followed all the steps for prepping front-end and adding scripts.
There are no console errors and even switching to the "default" theme doesn't work for conditions.
I got it working...
Basically, in a previous version of Umbraco Forms (I think we started with v10.2 perhaps) there was an update to use the
umbraco-forms-hidden
CSS class instead ofstyle="display: none;"
for conditional groups and fields. Because I was using a custom theme, this was missed during an upgrade.One other gotcha: I had to make sure that each field wrapper has
@f.CssClass
- this adds the appropriate fields for conditional showing/hiding too.Hope this helps!
Thanks Karl, you pointed me into the right direction. I had a custom theme for Umbraco Forms 11.1, and to make the conditional logic work in Umbraco Forms 13.0 I had to remove the
style="display:none;"
inForm.cshtml
.The
umbraco-forms-hidden
CSS class is set by calling@f.CssClass
, so this is what is left in my view:You also need the default forms stylesheet loaded or copy over the hide show classes to your own stylesheet
is working on a reply...