Radio button fields are not mappable
-
Hi,
I need to set IDs to some radio buttons options so I did this:
[radio formuletype “Formule ESQUISSE” id:esquisse]
[radio formuletype “Formule PROJET” id:projet]
[radio formuletype “Formule CONCEPTION” id:conception]
This functions correctly.
I am trying to get the selected button value to a meta field “formuletype”
But in the custom field section, I have the field name on the left but the field does not appear as an option.
I also tried a filter :
add_filter(‘cf7_2_post_filter-project-formuletype’,’filter_formuletype’,10,3);
function filter_formuletype($value, $post_id, $form_data){
if(isset($form_data[‘formuletype’])){
$value = update_post_meta( $post_id, ‘formuletype’, $form_data[‘formuletype’] );
}
return $value;
}
I also tried simply:
$value = $form_data[‘formuletype’];The idea is to get the form field value into a meta field value in the post. I am open to suggestions. Thanks in advance
- The topic ‘Radio button fields are not mappable’ is closed to new replies.