Support » Plugin: Contact Form 7 » Get value radio button and set additional setting

  • Fallensoul99


    New update *Head-bang* ! Documentation is terse.

    Question 1: How do I get the value from the radio button.

    This is my functions.php

    add_action (‘wpcf7_before_send_mail’,’wpcf7_redirect’);
    function wpcf7_redirect ($wpcf7) {
    $submission = WPCF7_Submission::get_instance();
    if ( $submission ) {
    $form_data = $submission->get_posted_data();
    $language = reset($form_data[‘radio-946’]);

    I have to use reset to get the first value from the array. It should just give me the value right? Anyway this currently works but it seems wrong.

    This works for me if people are pulling their hair out trying to redirect:

    $url = “on_sent_ok: \”location = ‘’;\””;
    $wpcf7->set_properties(array (‘additional_settings’ => $url));

  • The topic ‘Get value radio button and set additional setting’ is closed to new replies.