Alter form in my account page i written:
$form['field_first_name']['und']['0']['value']['#value'] = 'raju';
function my_callback_function($form,$form_state)
{
global $user;
$var = db_update('field_data_field_name')
->fields(array(
'field_name_value' => $form_state['value']['field_name[und][0][value]'], - > Not working -> store as NULL
'field_name_value' => '', -> empty value
'field_name_value' => 'raju', -> hard code stored
))
->condition('entity_id', $user->uid, '=')
->condition('entity_type', 'user', '=')
->execute();
drupal_set_message('Updated sifhup');
}
默认值仅存储在固定的API中的数据库中。但我喜欢在需要时覆盖该值。所以我想知道数据库中字段的form_state值。