Drupal 7. in my validate form function, I use form_set_value to set the value for the field "statut_metier" to 'draft'
If my field is a text field, this code works :
form_set_value($form['field_statut_metier'][LANGUAGE_NONE]['value'], 'draft', $form_state);
If my field is a list(text) field, with the key for the value 'draft' = 5
I can't manage to have the form_set_value function work.
Using Devel and dpm() I have search to reach this field value :
I have tried :
form_set_value($form['field_statut_metier2'][LANGUAGE_NONE]['#value'], '5' , $form_state);
but it doesn't work.
Any idea ?