Get value of contact form 7 radio button [closed]

Depending when you’d like to take the action you should change the hook – I’ve chosen wpcf7_before_send_mail – your function

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");

Explanation: radio buttons (like checkboxes) are returned in a form on an array. Radio values are one-element arrays, so you retrieve them by accessing the first element of the array. For checkboxes you’d have to iterate over the whole returned array to get all the values.