Last active
December 28, 2021 18:11
-
-
Save alex-authlab/5c0527eae6036363d832a5c31f7147b9 to your computer and use it in GitHub Desktop.
Fluent Forms Select Radio Field Value from Url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentform_rendering_field_data_input_radio', function ($data, $form) { | |
//change form id | |
if ($form->id != 91) { | |
return $data; | |
} | |
//add your get param key | |
$key = 'my_get'; | |
if(isset($_GET[$key])){ | |
$data['attributes']['value'] = sanitize_text_field($_GET[$key]); | |
} | |
return $data; | |
}, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment