function field_collection_form_alter in Field collection 7
Implements hook_form_alter().
Checks for a value set by the embedded widget so fields are not displayed with the 'all languages' hint incorrectly.
File
- ./
field_collection.module, line 27 - Module implementing field collection field type.
Code
function field_collection_form_alter(&$form, &$form_state) {
if (!empty($form['#field_collection_translation_fields'])) {
foreach ($form['#field_collection_translation_fields'] as $address) {
drupal_array_set_nested_value($form, array_merge($address, array(
'#multilingual',
)), TRUE);
}
}
}