Answers for "get data from radio button"

11

get radio button value javascript

document.querySelector('input[name="rate"]:checked').value;
Posted by: Guest on May-17-2020
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 data from radio button"

Code answers related to "Javascript"

Browse Popular Code Answers by Language