• Resolved mariosnft

    (@mariosnft)


    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

Viewing 1 replies (of 1 total)
  • Thread Starter mariosnft

    (@mariosnft)

    it was the single quote being a magic quote. It now works with fixing it to single quotes ‘ at the hidden fields of the contact form

    Dont know if you can do something about it but i copied the code from the plugin’s desrciption page. It might save some time for other people if you place a notice to make sure the single quotes are correct.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Get the hidden values’ is closed to new replies.