Link to the plugin: https://wordpress.org/plugins/cf7-conditional-fields/
-
This reply was modified 8 years, 5 months ago by
benhartwich.
Hi,
What are you trying to achieve exactly ?
I have some basic test cases with CF7 conditional fields that are working just fine.
Can you paste your form and conditional fields configuration ?
Hi,
I try to NOT enable the signature field on the group “unterschrift” whenever “praktikant” is selected at group “weitere-angaben”.
[group weitere-angaben]
<label>Sie als Antragsteller sind:
[select* personangaben include_blank "Fest angestellt" "Gast oder Praktikant/-in" "Hilfskraft" "Gasthörer"]</label>
[/group]
[group vorgesetzter]
<label>[text* name-vorgesetzter placeholder "Name Ihres Vorgesetzten"]</label>
<label>[tel* telefon-vorgesetzter placeholder "Telefonnummer Ihres Vorgesetzten"]</label>
<label>[email* email-chef placeholder "E-Mail Adresse Ihres Vorgesetzten"]</label><br>
<label>Unterschrift Ihres Vorgesetzten:
[signature* unterschrift background:#e0e0e0]</label><br>
[/group]
Rule: personenangaben not equals Gasthörer then show vorgesetzter.
-
This reply was modified 8 years, 5 months ago by
benhartwich.
Seams fine here. The signature is hidden if Gasthörer is selected. And i can write to it if not. Must be something else.
What about the weitere-angaben group ?
Anyway, having label tags around input fields is not a good idea (not W3C compliant). I don’t think it’s linked to your issue but it can’t hurt to have a proper HTML code in the form.
Update : i have the error too on Chrome. Just remove those label tags (use a fieldset or div if you want some kind of field wrapper) and it’ll get fixed.
Thanks – it seems to be related to twenty sixteen theme.
Contact form recommends using <label> tags – what would you recommend? <p>?
I don’t think they’d recommend this, i think you might have misinterpreted something.
You can use any wrapping element : p , div, span …
You can even leave the fields unwrapped, as CF7 is wrapping them automatically with span tags.
Contact Form wraps every element on a fresh contact form or the demo contact form with <label> tags. Perhaps you can insert a check for your plugin, that it could break signature field when somebody is using the label wrapper.
You’re right, that’s the default layout now … This is implicit label association which is not forbidden but it’s not the recommended way of doing it.
Anyway, i’ll try to find a workaround for this or add a notice like you suggest.
Thanks for reporting this.