problems with two selection fields
-
Hello everyone,
I have already made the entry elsewhere and cannot post it again here:
https://ww.wp.xz.cn/support/topic/plugin-conditional-fields-for-cf7/#post-15033753
Andreas
-
Can you share a small form code snippet + some conditions and tell me what you expect it to do?
`FORM-CODE
[select* typ “Bitte auswählen” “mit Zelt” “mit Wohnwagen” “mit Wohnmobil” “in Finnhütte oder Mietwohnwagen”]
<div class=”platzdiv”>
[group group-900]Platzwunsch [select platz1 “”][/group]
[group group-901]Platzwunsch [select platz2 “” “Zeltwiese”][/group]
[group group-902]Platzwunsch *[select* platz3 “” “Komfortplatz” “Komfortplatz Strandreihe” “Standardplatz Kat. 1” “Standardplatz Kat. 2” “Standardplatz Kat. 2 Strandreihe”][/group]
[group group-903]Platzwunsch *[select* platz4 “” “Komfortplatz” “Komfortplatz Strandreihe” “Standardplatz Kat. 1” “Standardplatz Kat. 2” “Standardplatz Kat. 2 Strandreihe”][/group]
[group group-904]Platzwunsch *[select* platz5 “” “Komfortplatz Hundebereich” “Standardplatz Kat. 1 Hundebereich” “Standardplatz Kat. 2 Hundebereich”][/group]
[group group-905]Platzwunsch *[select* platz6 “” “Komfortplatz Hundebereich” “Standardplatz Kat. 1 Hundebereich” “Standardplatz Kat. 2 Hundebereich”][/group]
[group group-906]Platzwunsch *[select* platz7 “” “Finnhütte” “Komfort-Mietwohnwagen”][/group]
[group group-907]Platzwunsch [select platz8 “” “Finnhütte”][/group]
</div>CONDITIONALS
show [group-901] if [typ] equals “mit Zelt”
show [group-902] if [typ] equals “mit Wohnwagen”
and if [Hund] not equals “mit Hund”
show [group-903] if [typ] equals “mit Wohnmobil”
and if [Hund] not equals “mit Hund”
show [group-904] if [typ] equals “mit Wohnwagen”
and if [Hund] equals “mit Hund”
show [group-905] if [typ] equals “mit Wohnmobil”
and if [Hund] equals “mit Hund”
show [group-906] if [typ] equals “in Finnhütte oder Mietwohnwagen”
and if [Hund] not equals “mit Hund”
show [group-907] if [typ] equals “in Finnhütte oder Mietwohnwagen”
and if [Hund] equals “mit Hund”
show [group-900] if [typ] equals “Bitte auswählen”Could you add the code as code? (You forgot the closing tag `)
Or even better, you could paste the code here: https://conditional-fields-cf7.bdwm.be/form-tester/ and share the link[select* typ “Bitte auswählen” “mit Zelt” “mit Wohnwagen” “mit Wohnmobil” “in Finnhütte oder Mietwohnwagen”] <div class=”platzdiv”> [group group-900]Platzwunsch [select platz1 “”][/group] [group group-901]Platzwunsch [select platz2 “” “Zeltwiese”][/group] [group group-902]Platzwunsch *[select* platz3 “” “Komfortplatz” “Komfortplatz Strandreihe” “Standardplatz Kat. 1” “Standardplatz Kat. 2” “Standardplatz Kat. 2 Strandreihe”][/group] [group group-903]Platzwunsch *[select* platz4 “” “Komfortplatz” “Komfortplatz Strandreihe” “Standardplatz Kat. 1” “Standardplatz Kat. 2” “Standardplatz Kat. 2 Strandreihe”][/group] [group group-904]Platzwunsch *[select* platz5 “” “Komfortplatz Hundebereich” “Standardplatz Kat. 1 Hundebereich” “Standardplatz Kat. 2 Hundebereich”][/group] [group group-905]Platzwunsch *[select* platz6 “” “Komfortplatz Hundebereich” “Standardplatz Kat. 1 Hundebereich” “Standardplatz Kat. 2 Hundebereich”][/group] [group group-906]Platzwunsch *[select* platz7 “” “Finnhütte” “Komfort-Mietwohnwagen”][/group] [group group-907]Platzwunsch [select platz8 “” “Finnhütte”][/group] </div>show [group-901] if [typ] equals “mit Zelt” show [group-902] if [typ] equals “mit Wohnwagen” and if [Hund] not equals “mit Hund” show [group-903] if [typ] equals “mit Wohnmobil” and if [Hund] not equals “mit Hund” show [group-904] if [typ] equals “mit Wohnwagen” and if [Hund] equals “mit Hund” show [group-905] if [typ] equals “mit Wohnmobil” and if [Hund] equals “mit Hund” show [group-906] if [typ] equals “in Finnhütte oder Mietwohnwagen” and if [Hund] not equals “mit Hund” show [group-907] if [typ] equals “in Finnhütte oder Mietwohnwagen” and if [Hund] equals “mit Hund” show [group-900] if [typ] equals “Bitte auswählen”Please fix your code. You are using quotes like this
“and”. These are not valid characters, you need to write the code with simple quotes"Hi Jules,
thanks for your help. I learned something again there. I’ll give it a try and come back to you if necessary. I wish you a Merry Christmas and greetings from Northern Germany.Hi Jules, with that I solved a problem. But I still have one problem. Inactive conditional fields are also transmitted with the e-mail. For example, the field place8 is transmitted, although according to cf it cannot be active.
<div class="typauswahl"> <p>Urlaub ... * [select* typ "Bitte auswählen" "mit Zelt" "mit Wohnwagen" "mit Wohnmobil" "in Finnhütte oder Mietwohnwagen"]</p></div> <div class="hundboot"> <div align="right">[checkbox Hund label_first "mit Hund"]</div><div align="right">[checkbox boot1 label_first "mit Boot am Steg"] [checkbox boot2 label_first "mit Boot am Platz"]</div></div> <div class="platzdiv"> [group group-901]Platzwunsch [text platz2 'Zeltwiese'][/group] [group group-902]Platzwunsch *[select* platz3 '' 'Komfortplatz' 'Komfortplatz Strandreihe' 'Standardplatz Kat. 1' 'Standardplatz Kat. 2' 'Standardplatz Kat. 2 Strandreihe'][/group] [group group-903]Platzwunsch *[select* platz4 '' 'Komfortplatz' 'Komfortplatz Strandreihe' 'Standardplatz Kat. 1' 'Standardplatz Kat. 2' 'Standardplatz Kat. 2 Strandreihe'][/group] [group group-904]Platzwunsch *[select* platz5 '' 'Komfortplatz Hundebereich' 'Standardplatz Kat. 1 Hundebereich' 'Standardplatz Kat. 2 Hundebereich'][/group] [group group-905]Platzwunsch *[select* platz6 '' 'Komfortplatz Hundebereich' 'Standardplatz Kat. 1 Hundebereich' 'Standardplatz Kat. 2 Hundebereich'][/group] [group group-906]Platzwunsch *[select* platz7 '' 'Finnhütte' 'Komfort-Mietwohnwagen'][/group] [group group-907]Platzwunsch [select platz8 'Finnhütte'][/group]</p></div>'show [group-901] if [typ] equals “mit Zelt”
show [group-902] if [typ] equals “mit Wohnwagen”
and if [Hund] not equals “mit Hund”
show [group-903] if [typ] equals “mit Wohnmobil”
and if [Hund] not equals “mit Hund”
show [group-904] if [typ] equals “mit Wohnwagen”
and if [Hund] equals “mit Hund”
show [group-905] if [typ] equals “mit Wohnmobil”
and if [Hund] equals “mit Hund”
show [group-906] if [typ] equals “in Finnhütte oder Mietwohnwagen”
and if [Hund] not equals “mit Hund”
show [group-907] if [typ] equals “in Finnhütte oder Mietwohnwagen”
and if [Hund] equals “mit Hund”‘show [group-901] if [typ] equals "mit Zelt" show [group-902] if [typ] equals "mit Wohnwagen" and if [Hund] not equals "mit Hund" show [group-903] if [typ] equals "mit Wohnmobil" and if [Hund] not equals "mit Hund" show [group-904] if [typ] equals "mit Wohnwagen" and if [Hund] equals "mit Hund" show [group-905] if [typ] equals "mit Wohnmobil" and if [Hund] equals "mit Hund" show [group-906] if [typ] equals "in Finnhütte oder Mietwohnwagen" and if [Hund] not equals "mit Hund" show [group-907] if [typ] equals "in Finnhütte oder Mietwohnwagen" and if [Hund] equals "mit Hund"You need to wrap platz with the group name, for example like this for platz8:
[group-907][platz8][/group-907]Everything between [group-907] and [/group-907] will only be outputted in the email if group-907 was visible during form submission.
Hi Jules, thanks. It wasn’t. Times have attached a screenshot. Probably slowly I don’t see the forest for the trees.
How is the group declared?
[group group-901][/group group-901] or
[group-901][/group-901]
My code actually corresponds completely to your tutorial.When I coded
[group group-907]Platzwunsch [select platz8 'Finnhütte'][/group group-901]
the form is no longer shown.<div class="platzdiv"> [group group-901]Platzwunsch [text platz2 "Zeltwiese"][/group group-901] [group group-902]Platzwunsch *[select* platz3 "" "Komfortplatz" "Komfortplatz Strandreihe" "Standardplatz Kat. 1" "Standardplatz Kat. 2" "Standardplatz Kat. 2 Strandreihe"][/group group-902] [group group-903]Platzwunsch *[select* platz4 "" "Komfortplatz" "Komfortplatz Strandreihe" "Standardplatz Kat. 1" "Standardplatz Kat. 2" "Standardplatz Kat. 2 Strandreihe"][/group group-903] [group group-904]Platzwunsch *[select* platz5 "" "Komfortplatz Hundebereich" "Standardplatz Kat. 1 Hundebereich" "Standardplatz Kat. 2 Hundebereich"][/group group-904] [group group-905]Platzwunsch *[select* platz6 "" "Komfortplatz Hundebereich" "Standardplatz Kat. 1 Hundebereich" "Standardplatz Kat. 2 Hundebereich"][/group group-905] [group group-906]Platzwunsch *[select* platz7 "" "Finnhütte" "Komfort-Mietwohnwagen"][/group group-906] [group group-907]Platzwunsch [select platz8 "Finnhütte"][/group group-907] </div>Hi Jules. I finally got it done. I got you wrong at first. It was about the email code.
Thank you for your patience and help. Successful and healthy year 2022.
AndreasThanks buddy, wish you the best for the new year
The topic ‘problems with two selection fields’ is closed to new replies.