Skip Navigation

[Resolved] Conditional display in Forms is not hiding labels

This support ticket is created 5 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by beatR 5 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1356553

I am trying to: have conditional display logic on custom field

Link to a page where the issue can be seen: hidden link
changing the "Prüfung" to Eignungsprüfung, the fields "Eignungspruefung Wann" and "Eignungspruefung Wo" are displayed/hidden. but it doesnt display/hide the labels.

I expected to see: not only the input field to be displayed/hidden but also the label for it

Instead, I got: only the input field gets hidden

visually this function is kind of pointless, if it doesnt hide the labels. or what am i missing?

#1356561

Hello,

I have tried the URL you mentioned above, I can see only blank content in that page.

I assume we are talking a form for creating/editing post, if it is, you can try to follow our document to displaying those specific fields and labels conditionally:
https://toolset.com/documentation/user-guides/conditional-display-for-form-inputs/

For example, you need to make sure both the field input shortcode and labels are wrapped insider [cred_show_group] ... [/cred_show_group] shortcode.

#1356853

This works as solution in this case, for now. But i was hoping that i can globally control display condition in the custom-fields declaration. but this is not really the case, since this function does not hide the the label/parent form-group but only the input field.

i guess defining it on custom-field level is only useful for backend entry of data, while defining it using your mentioned shortcodes is the way to go on frontend-forms?

but this is not really what it says on your link:
"Each of the fields in your --->form<--- can be displayed based on a condition. This can be controlled directly from Types. You can set a condition for your field in the following way:"

so, i think i dont understand it quite yet: if i want to define globally, on custom fields level, how do i make the labels disapear?

#1357229

adding here: this is not really satisfying already since i have to duplicate code for entry as well as edit form. and i think there must a misunderstanding (on my side).

it seems to be rather pointless to have only the input-fields hide/display when defining the logic in the custom-fields. how do i solve this?

thanks!

#1357509

No, there isn't misunderstanding.

Here is the feedback from our developers:

No, it is not possible. As you describe, labels and wrapping HTML are not direct part of the field in Toolset Forms plugin, and they are indeed hardcoded in the form editor, so they can not be part of what is shown and hidden, because they are open to user manipulation.

You can add a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

And currently, you will need to wrapped the field input shortcode and labels insider [cred_show_group] ... [/cred_show_group] shortcode, see my answer above:
https://toolset.com/forums/topic/conditional-display-in-forms-is-not-hiding-labels/#post-1356853

#1357659

My issue is resolved now. Thank you!