Posted Data: how to get dropdown value?
-
Hello everyone!
Sorry if I have missed this somewhere in the documentation, I have an issue getting the dropdown value (not display text) in my custom function. I am getting the posted form data as follows:
$submission = WPCF7_Submission::get_instance(); $formData = $submission->get_posted_data(); $countryCode = $formData["your-country"];
“your-country” is a dropdown box with all the country names and their two letter ISO code, example:
<option value="JP">Japan</option>
$formData[“your-country”] returns me only the caption (“Japan”) but not the actual option value. Is there any way to get the option value?
Thank you so much!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Posted Data: how to get dropdown value?’ is closed to new replies.