-
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
Conditionally shown fields are not included in form record #875
Comments
Okay, the
In that case I also needed to trim it is the field type.
However I am still seeing the conditionally fields to be missing on submission. |
[object Object]
What are you using for your condition rule here please? I.e. what value are you checking against to determine that the checkbox is ticked? |
We have this condition on the group (fieldset): We then have a groups/fieldset initially hidden, but clicking a button change the value of the hidden field to and when this value is I should mention that we have some special JS logic in the button to more more fields as it didn't seem Forms reacted on just changing value of the hidden field via JS.
|
For this usecase nested groups/fieldset would be useful and make complex forms easier to manage conditionally shown groups. |
As far as I can tell from my tests you should find this works OK if you use "true" as your value to match with, rather than "True". I'll have a look though at making this case insensitive. Either works client-side so we should have the same behaviour server-side. |
@AndyButland regarding the
I guess it may be a deserialization issue when I before used a
|
@AndyButland you are right about this. It works when we use "true" / "false" instead of "True" or "False". However it seems it isn't enough changing hidden field value from So in this button field which change value of the hidden field "Collapse", we also needed to change fieldsets manually from I guess Forms isn't watching a value change in this case when changed via JS - at least not from outside.
|
If you set the condition to "true" instead of "True", the |
@mcl-sz that's what we originally used, but unfortunately not. It did should a group/fieldset when checking "Specify invoice details", but data in these fields wasn't stored in the record. They are now after we changed value to "true". However modifying a value in a hidden field from "True" or "true" (tried both) from JS (in a custom field) doesn't seem to affect the conditional rule to show/hide groups based on this value. I guess Forms doesn't watch value in this case - only initially or when checking/unchecking e.g. a checkbox. |
Hi @bjarnef , thanks for your reply. I see a didn't gave a good explanation of what I mean. |
But then happens before the confirmation email, when the form is submitted and the record is created. As long the record hasn't the submitted data, I wouldn't expect the values to flow into other workflows like in SendRazorEmail workflow/template. Anyway it should probably handle the invariant value on both client and service side as @AndyButland mentioned, so it doesn't matter whether "True" or "true" is entered. |
Resolved to make this check case insensitive for the next patch release. |
I noticed when submitting a form the entry is created and labels looks correct.
However when editing form entry it shows
[object Object]
Furthermore I noticed fields which are conditionally shows based on a value of another field (in this case a checkbox) are not stored in the record properties. I did fill out these form fields yes :)
Umbraco v10.2.0
Umbraco Forms v10.1.2
The text was updated successfully, but these errors were encountered: