I have a form in which field my_consultant_id
is "Hidden integer" type field and having widget type as "Hidden field".
I am assigning the value to this field by using hook_form_alter
function threebl_summary_report_form_alter(&$form, &$form_state, $form_id) {
if($form_id == 'eck__entity__form_add_summary_report_comparative_client_group') {
global $user;
$form['field_created_by']['und'][0]['#default_value'] = (int) $user->uid;
}
}
But not able to set the value for that field.
If I inspect the form it shows html code for field like:
<div class="field-type-field-hidden-integer field-name-field-my-consultant-id field-widget-field-hidden form-wrapper" id="edit-field-my-consultant-id">
Thanks in advance.