Get the hidden values
-
Hello,
I want to do stuff once the cf7 form submits.
I am using
add_action(‘wpcf7_mail_sent’,’save_my_form_data_to_my_cpt’, 10, 1 );to hook my code on mail sent action. I want to read the posted data. When a user fills normal input fields you get the value as follows:
example:
for this cf7 field:
[textarea your-review placeholder “Your Review”]you would use:
$submission = WPCF7_Submission::get_instance();
$posted_data = $submission->get_posted_data();
$posted_data[‘your-review’];————–
I want to access the value of a hidden field
example on cf7 form:
[dynamichidden dynamichidden-email “CF7_GET key=’email’”]How do I use the value of this hidden field on my hooked function (described above)?
Thank you for your time
Marios Neophytou
- The topic ‘Get the hidden values’ is closed to new replies.