Using same variable in different groups in Contact Form 7 WordPress

  contact-form-7, javascript, jquery, php, wordpress

I’m trying to use conditional field tto get the correct answer selected in a group of field.
When the user choose a "Game" option in a dropdown select field, another field "Plataform" appears and show another options. Perhaps, when I need to pass the variable in body response email it gets only the result of the last group, always returning me "Choose Plataform" as response. I would like to ignore all Choose Plataform and get only the choose one option.


[group AnneFrank clear_on_hide][select Platform class:support-input-style "Choose Platform" "Oculus Rift" "Oculus Quest" "Oculus Go"][/group]
[group CoasterCombat clear_on_hide][select Platform class:support-input-style "Choose Platform" "Oculus Quest" "Oculus Go"][/group]
[group Landfall clear_on_hide][select Platform class:support-input-style "Choose Platform" "Oculus Rift"][/group]
[group MeetingRembrandt clear_on_hide][select Platform class:support-input-style "Choose Platform" "Oculus Go" "Samsung Gear VR"][/group]
[group NationalGeographicExploreVR clear_on_hide][select Platform class:support-input-style "Choose Platform" "Oculus Quest" ][/group]
[group PetLab clear_on_hide][select Platform class:support-input-style "Choose Platform" "Oculus Go" "Samsung Gear VR"][/group]
[group PicturePartyVR clear_on_hide][select Platform class:support-input-style "Choose Platform" "Sony Playstation VR"][/group]
[group TERM1NAL clear_on_hide][select Platform class:support-input-style "Choose Platform" "Samsung Gear VR"][/group]

my email body is:

Name: [Name]
Email: [E-mail]
Game: [Game]
Platform:  [Platform]
Message: [message]
Consent: [consent]

I have tried using differentr name vars like: Plataform1, Plataform2, Plataform3. But in body I need to pass all the variable and look like: "Choose Game", "Choose Game", "Oculos Go", "Choose Game"…

Source: Ask Javascript Questions

LEAVE A COMMENT