-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional field sets based on Drop Down values don't show. #207
Comments
Yikes, good find! So we'll need to figure out why it would add a space there at the end.. so weird. We'll have a look at it! |
Yep it's very odd, I couldn't figure out where the extra space comes from either, but it was visible in this function:
At this point, the value of |
Hello @nul800sebastiaan I have also encountered this issue. It can be fixed by adding a .trim() to the comparison in javascript. The below image should show what I mean. Should I create a pull request for this change? |
Hiya @NikRimington, Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more. We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed). To open it this issue up again, you can write For example:
This will reopen the issue in the next few hours. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
@umbrabot still relevant It looks like it is the text of the select option (rather than value) that is used for comparison so if the text doesn't nudge up to the > and < of the html tags you end up with whitespace around it and the comparison fails. This is what we had in our themes FieldType.DropDownList.cshtml files when showing the conditional was failing:
Changing it so the entire thing is on one line fixes the issue.
|
Resolved in the linked PR and due in 8.7.2, |
Umbraco Version: 7.15.1
Umbraco Forms Version: 7.1.1
Bug Description
A large form which has multiple conditional field sets based on a drop down isn't showing the conditional fields when the drop down value changes. This means that questions aren't showing to the front end user and, as some are mandatory, the form doesn't submit and doesn't show errors.
What I would expect to happen
I'd expect the conditional questions to show when the appropriate drop down option is selected.
Why does this occur
The error appears to be occuring in the conditional rule validation where values are retrieved and compared. When the JS code is retrieving the value for the drop down it is adding an extra space to the value it get's. As a result when performing it's rule check for conditional logic it is failing as
"A string "
does not equal"A string"
.This item has been added to our backlog AB#2343
The text was updated successfully, but these errors were encountered: