Mail data with conditional fields
-
Hi everyone,
I’m looking to create a form displaying a result based on the choices a user can make and then being able to send a summary.
But here is my problem, when I try to display the result obtained in the email, I only get the tag associated with the text (“[choice-1]” in my case). What I want is the same result displayed in the form and only the ones shown on the screen based on the conditions.I will have to make a whole tree structure with different choices and I would like to display only the results obtained by the user without having the tags.
I’m using “Conditional Fields for Contact Form 7” to get my results
This is what my code currently looks like:
<label class="form-title"> Type de projet</label> [radio type_projet use_label_element default:0 "Salle de bain" "Séjour" "Extérieur" "Maison entière"] [group projet_sdb] <label class="form-title">Style</label> <div class="inline-img"> <span class="img-form">[radio style use_label_element default:1 "Minimaliste"] <img src='https://carrelage-de-la-tour.com/wp-content/uploads/salle-de-bain-minimaliste.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:2 "Authentique"] <img src='https://carrelage-de-la-tour.com/wp-content/uploads/salle-de-bain-authentique.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:3 "Industriel"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/salle-de-bain-industriel.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:4 "Scandinave"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/salle-de-bain-scandinave.jpeg' width=50px height=50px></span> </div> [/group] [group projet_sejour] <label class="form-title">Style</label> <div class="inline-img"> <span class="img-form">[radio style use_label_element default:1 "Minimaliste"] <img src='https://carrelage-de-la-tour.com/wp-content/uploads/2022/08/un-carrelage-effet-naturel-grand-format-et-contemporain-dans-un-salon-sejour-de-lattes.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:2 "Authentique"] <img src=https://carrelage-de-la-tour.com/wp-content/uploads/sejour-authentique-.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:3 "Industriel"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/2021/01/carrelage-sol-salon-sejour-effet-parquet-naturel-bois-de-chene-mixe-carrelage-effet-beton-brut-aux-murs-pour-un-style-authentique-industriel-dans-une-maison-moderne-de-saint-gely-du-fesc.jpg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:4 "Scandinave"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/sejour-scandinave.jpeg' width=50px height=50px></span> </div> [/group] [group projet_ext] <label class="form-title">Style</label> <div class="inline-img"> <span class="img-form">[radio style use_label_element default:1 "Minimaliste"] <img src='https://carrelage-de-la-tour.com/wp-content/uploads/exterieur-minimaliste.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:2 "Authentique"] <img src='https://carrelage-de-la-tour.com/wp-content/uploads/exterieur-authentique.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:3 "Industriel"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/exterieur-industriel.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:4 "Scandinave"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/exterieur-scandinave.jpeg' width=50px height=50px></span> </div> [/group] [group projet_maison] <label class="form-title">Style</label> <div class="inline-img"> <span class="img-form">[radio style use_label_element default:1 "Minimaliste"] <img src='https://carrelage-de-la-tour.com/wp-content/uploads/maison-entiere-minimaliste.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:2 "Authentique"] <img src='https://carrelage-de-la-tour.com/wp-content/uploads/maison-entiere-authentique.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:3 "Industriel"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/maison-entiere-industrielle.jpeg' width=50px height=50px></span> <span class="img-form">[radio style use_label_element default:4 "Scandinave"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/maison-entiere-scandinave.jpeg' width=50px height=50px></span> </div> [/group] <label class="form-title"> Teintes</label> <div class="inline-img"> <span class="img-form">[radio teinte use_label_element default:1 "Neutres"] <img src='https://carrelage-de-la-tour.com/wp-content/uploads/teinte-neutre-carrelage.jpeg' width=50px height=50px></span> <span class="img-form">[radio teinte use_label_element default:2 "Chaudes"] <img src='https://carrelage-de-la-tour.com/wp-content/uploads/teinte-chaude-carrelage.jpeg' width=50px height=50px></span> <span class="img-form">[radio teinte use_label_element default:3 "Froides"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/teinte-froide-carrelage.jpeg' width=50px height=50px></span> <span class="img-form">[radio teinte use_label_element default:4 "Sombres"]<img src='https://carrelage-de-la-tour.com/wp-content/uploads/teinte-sombre-carrelage.jpeg' width=50px height=50px></span> </div> <label class="form-title"> Surface</label> [radio type_surface use_label_element default:1 "Sol" "Mur" "Sol + Mur"] [group surface_sol] <label>Sol (m2)</label> [number dimension_sol] [/group] [group surface_mur] <label>Mur (m2)</label> [number dimension_mur] [/group] [group surface_sol_mur] <label>Sol (m2)</label> [number dimension_sol_mur_1] <label>Mur (m2)</label> [number dimension_sol_mur_2] [/group] <h3>Vos coordonnées</h3> <label> Nom</label> [text* Nom] <label> Email</label> [email* your-mail] <label> Budget (€)</label> [number budget] <h3>Notre sélection pour vous</h3> [group choix_1] <table class="border-none"> <tr> <td> <div style="height:250px;width:250px;background-size:cover;background-image: url('https://carrelage-de-la-tour.com/wp-content/uploads/2021/01/carrelage-effet-parquet-naturel-bois-de-chene-clair-au-sol-et-carrelage-effet-metal-gris-anthracite-au-mur-pour-une-chambre-style-scandinave-dans-un-appartement-neuf-de-baillargues.jpg');"></div> </td> <td> <h2>Nom référence</h2> <p><strong>Format : </strong>90 x 90 cm</p> <p><strong>Description : </strong>Un carreau contemporain qui saura ravir votre intérieur comme extérieur</p> <p><strong>Délais de livraison : </strong>2 semaines</p> <p><strong>Tarif : </strong>90€ HT/m2</p> </td> </tr> </table> [/group] [group choix_2] <p>choix 2</p> [/group] [submit "Recevoir la sélection"]
And here is the conditional logic :
show [surface_sol] if [type_surface] equals “Sol”
show [surface_mur] if [type_surface] equals “Mur”
show [surface_sol_mur] if [type_surface] equals “Sol + Mur”
show [projet_sdb] if [type_projet] equals “Salle de bain”
show [projet_sejour] if [type_projet] equals “Séjour”
show [projet_ext] if [type_projet] equals “Extérieur”
show [projet_maison] if [type_projet] equals “Maison entière”
show [choix_1] if [teinte] equals “Sombres”
and if [type_surface] equals “Sol”
and if [style] equals “Minimaliste”
show [choix_2] if [type_projet] equals “Salle de bain”Thanks for your help.
The page I need help with: [log in to see the link]
- The topic ‘Mail data with conditional fields’ is closed to new replies.