Closed (fixed)
Project:
Inline Entity Form
Version:
7.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2013 at 10:50 UTC
Updated:
8 Feb 2013 at 16:30 UTC
I have a custom module which creates a new entity and entity_type bundle.
As part of the .install file I have module_enable function which uses:
entity_save($type, entity_create($type, $values));
To create a few of the new entities and
field_create_field($field);
To create a few fields.
One of the fields created is of type 'entityreference' for which I create a new instance as below:
// Create the instance on the bundle.
$instance = array(
'field_name' => 'new_addon_field',
'entity_type' => 'custom_entity',
'label' => 'A new field',
'bundle' => 'custom_entity_type_bundle',
'widget' => array(
'type' => 'inline_entity_form',
\\HOW TO PASS INLINE_ENTITY_FORM THE SETTINGS FOR TARGET ENTITY AND ALLOWABLE BUNDLES??
),
);
field_create_instance($instance);This all seams to work fine so far. However, how do you pass the settings to the widget so that the inline_entity_form has the correct pre-configured target entity and allowable bundles.
Comments
Comment #1
bojanz commentedIt's a field-level setting, not an IEF level setting.