I'm having problems with conditional fields in Forms 6.0.6 - they don't show up, ever.
I've eliminated all the obvious things (dependencies are loaded, no CSS conflicts etc), and found that in umbracoforms-conditions.js there's a reference to .contourField:
for (fieldId in fieldConditions) {
handleCondition($("#" + fieldId).closest(".contourField"), fieldId, fieldConditions[fieldId], "Field");
}
That code is looping through the conditions for each form field, where the handleCondition function toggles show/hide on first argument, which should be the ancestor element of the input and its label, selected by the input ID (the fieldId value, in this case)
Truncated for brevity:
<div class="umbraco-forms-field name shortanswer mandatory">
<label for="837db468-9dec-4a91-d45a-757759c97c49" class="fieldLabel"> Name <span class="contourIndicator">*</span></label>
<div><input type="text" name="837db468-9dec-4a91-d45a-757759c97c49" id="837db468-9dec-4a91-d45a-757759c97c49" class="text" value="" maxlength="500" data-val="true" data-val-required="Please provide a value for Name">
</div>
</div>
However, notice the selector used in closest() -> .contourField. That doesn't exist in my rendered forms, instead (as expected in Forms), the class is .umbraco-forms-field.
This issue appears on the contact form on umbraco.com (that's where the code snippets are from).
Is this a genuine bug, or are we just doing something screwy?
I am experiencing the same issue with a condition on a radio button value not working at all. This has worked for us in the past on version 6.0.2 of the forms but in version 7.0.1 it is no longer working.
Years are passing by and it's still there... Has anyone made Umbraco Forms working with the latest v7 and conditions and can share the code with all the replacements/fixes applied?
Maybe then we can send it to Umbraco to include it for the next patch release...
I am experiencing the same issue with a condition on a radio button value not working at all. This has worked for us in the past on version 6.0.2 of the forms but in version 7.0.1 it is no longer working.
Hi - I've just been pointed to this discussion which I hadn't seen before. I've been doing some tests with conditions on the latest Umbraco 7 recently and it seems to be working OK to me (see comment here).
The issue in the original post certainly looks wrong, but as far as I can tell this file isn't used. When rendering a form it's this file that's loaded into the browser: App_Plugins\UmbracoForms\Assets\themes\default\umbracoforms.js
Maybe there's some context where the file is used and I'm not aware of though... so if someone is still having trouble and they can clearly raise the issue with replicable steps on the issue tracker, we can look further. Of course by now there have been several versions of Forms since V7 but if there are obvious, blocking bugs we'd still like to get them patched.
Conditional fields not working
I'm having problems with conditional fields in Forms 6.0.6 - they don't show up, ever.
I've eliminated all the obvious things (dependencies are loaded, no CSS conflicts etc), and found that in umbracoforms-conditions.js there's a reference to
.contourField
:That code is looping through the conditions for each form field, where the handleCondition function toggles show/hide on first argument, which should be the ancestor element of the input and its label, selected by the input ID (the fieldId value, in this case)
Truncated for brevity:
However, notice the selector used in closest() ->
.contourField
. That doesn't exist in my rendered forms, instead (as expected in Forms), the class is.umbraco-forms-field
.This issue appears on the contact form on umbraco.com (that's where the code snippets are from).
Is this a genuine bug, or are we just doing something screwy?
cheers, champions Nathan
I've come across this too, I think it's a bug
Has there been a solution to this, we have the same problem.
As far as I know, it's still an issue (still open on the tracker).
I resolved it for our site by editing the JavaScript to use the correct selector.
Forms is tricky, would be a simple PR but it's not open source...
This is fairly daft, not really a viable product if one of the major functions just hasn't worked for 3 months.
I am experiencing the same issue with a condition on a radio button value not working at all. This has worked for us in the past on version 6.0.2 of the forms but in version 7.0.1 it is no longer working.
Years are passing by and it's still there... Has anyone made Umbraco Forms working with the latest v7 and conditions and can share the code with all the replacements/fixes applied?
Maybe then we can send it to Umbraco to include it for the next patch release...
Still an issue in Umbraco Forms 7.3.1
The fix above works - changing contourField to umbraco-forms-field at the bottom of umbracoforms-conditions.js
This should be a relatively straightforward fix, so i'm surprised its still knocking around.
Fairly rediculous this now, needs sorted, especially considering we are being charged £200 for a license!!
Yes, please fix this issue. I can't believe it's been this long with no fix. I now have to write my own logic to work-around this broken feature.
I am experiencing the same issue with a condition on a radio button value not working at all. This has worked for us in the past on version 6.0.2 of the forms but in version 7.0.1 it is no longer working.
This is genuinely dumb, not actually a feasible item in the event that one of the significant capacities simply hasn't labored for a very long time.
I can't really accept that it's been this long. Is This a bug ?
Same here, conditional logic not working at all.
And a year later, still broken.
At least for the conditions on the submit button. Still no luck anyone?
Hi - I've just been pointed to this discussion which I hadn't seen before. I've been doing some tests with conditions on the latest Umbraco 7 recently and it seems to be working OK to me (see comment here).
The issue in the original post certainly looks wrong, but as far as I can tell this file isn't used. When rendering a form it's this file that's loaded into the browser:
App_Plugins\UmbracoForms\Assets\themes\default\umbracoforms.js
Maybe there's some context where the file is used and I'm not aware of though... so if someone is still having trouble and they can clearly raise the issue with replicable steps on the issue tracker, we can look further. Of course by now there have been several versions of Forms since V7 but if there are obvious, blocking bugs we'd still like to get them patched.
Andy
is working on a reply...