D7: hook_field_extra_fields() + field_attach_form()
Hi, I exposed a field in hook_field_extra_fields(): $form_elements['item_description'] = array( 'label' => t('Item Description'), 'description' => t('Item Description (an extra form field)'), 'weight' => -5, ); $extra_fields['entity_example_basic']['first_example_bundle']['form'] = $form_elements; return $extra_fields; Now I thought, by calling field_attach_form('entity_example_basic', $entity, $form, $form_state); in a form callback, it will be attached to $form automatically. But it doesn't. Is there a way to change that? Or do I have to add the form field manually in any case? If I there's no way to attach it automatically - what is the sense in exposing the field in hook_field_extra_fields()? Cheers, -- Georg | http://serchilo.net - command the web
participants (1)
-
Georg Jaehnig