I have a fairly long Post Form so I want to hide a number of the form fields unless certain earlier form fields have content. As an example:
I have a post form field called 'room1-name'
I want to display another group of fields only if 'room1-name' has some content entered by the user.
I tried the condition group settings in the attached image but it does not work. Can you advise what to do please.
Regards
Robert
Hello, you can omit the quotation marks inside the Value field configurations, as shown in the attachment here. Just an empty value field is fine. The conditional block supports nested elements, so you will drag the content you want displayed conditionally into the conditional block. In my example here, there is a custom HTML block inside the Conditional block contents, so the HTML block will only be displayed if the field is not empty.
Let me know if you have issues with this setup, and I can take a closer look.
Hi Christian
Thanks for the advice. I omitted the quotation marks inside the Value field and it starting working. One more question please.
In your example, is there any way for the hidden elements to be revealed as you begin to type into the field which controls where the block is hidden or displayed? I mean without having to click away first?
Regards
Robert
Hello again Christian
I have had a further issue with the post form conditional display function.
When I programme a conditional display block in the form and save the form, the conditional display works correctly.
However, if I save the form again (irrespective of whether I make changes to the form or not) then none of the conditional display blocks work.
To make them work again, I have to:-
Bring all of the fields out of the conditional display block wrapper, then put them back in again, and save the form. Then the conditional blocks start to work again.
I have checked out this issue on two separate post forms and the problem is repeatable as described above.
Could you let me know if you can recreate this issue on your own system?
If not, can I give you access to my system to check out the problem please.
I am running Toolset Forms V2.6.2
Regards
Robert
In your example, is there any way for the hidden elements to be revealed as you begin to type into the field which controls where the block is hidden or displayed? I mean without having to click away first?
The Forms conditional system is triggered by an input change event, not a keyup or keydown event. It's a technical concept but if you're comfortable writing custom JavaScript you may be able to work around this by triggering a change event upon the keyup or keydown event to trigger the conditional logic. Since there is no public JavaScript API for Forms, that code is outside the scope of our support forums.
However, if I save the form again (irrespective of whether I make changes to the form or not) then none of the conditional display blocks work....Could you let me know if you can recreate this issue on your own system?
Yes, unfortunately this is a known issue that has not yet been fully resolved. The fix for this issue will be included in Forms 2.6.4, but I don't have a release date available yet for that update. Until then, your workaround sounds like the best temporary fix. You can subscribe to updates in this erratum: https://toolset.com/errata/conditionally-hidden-fields-in-toolset-forms-are-removed-from-the-drag-and-drop-editor-if-you-edit-the-form/
Hi Christian
Thanks for your explanation about what triggers the conditional event.
And thanks for confirming that there is issue with the conditional display in forms. I have added my voice to the link your supplied.
Regards
Robert