Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I tested it and worked for me:
$form['field_user_flag']['und']['#default_value']$form['field_user_flag'][LANGUAGE_NONE]['#default_value'] = 1;
You can also set a default value of this field (in field settings in field managment).
$form['field_user_flag']['und']['#default_value'] = 1;
$form['field_user_flag'][LANGUAGE_NONE]['#default_value'] = 1;
I testtested it and worked for me:
$form['field_user_flag']['und']['#default_value'] =1;= 1;
also youYou can also set a default value of this field to check (in field settings in field managment).
I test it and worked for me
$form['field_user_flag']['und']['#default_value'] =1;
also you can set default value of this field to check (in field settings in field managment)