Answers for "get posted data from radio button cf7"

0

get posted data from radio button cf7

function wpcf7_cstm_function($contact_form) {
    $title = $contact_form->title;
    $submission = WPCF7_Submission::get_instance();

    if ($submission) {
        $posted_data = $submission->get_posted_data();

        $txt = isset($posted_data['txt'])?$posted_data['txt']:'';
        $text2 = isset($posted_data['txt2'])?$posted_data['txt2']:'';
        $radio = isset($posted_data['radio'][0])?$posted_data['radio'][0]:'';

        // do something with your data
    }
}
add_action("wpcf7_before_send_mail", "wpcf7_cstm_function");
Posted by: Guest on May-19-2021

Code answers related to "get posted data from radio button cf7"

Browse Popular Code Answers by Language