I'm trying to programmatically create an entityreference field that is an autocomplete having a START_WITH setting. I've got it all set up fine so when I load the module that the widget is correctly created, however, when I type in text in the field it finds no entries. The weird part is if I go to the widget settings page via the UI and just press the SAVE button on the page it starts working.

Here is what I"m using for the field:
'exercises_equipment' => array(
'field_name' => 'exercises_equipment',
'type' => 'entityreference',
'cardinality' => FIELD_CARDINALITY_UNLIMITED,
'settings' => array(
'target_type' => 'equipment',
'handler_settings' => array('target_bundles' => array('')),
),
),

Here is what I'm using for the instance:
'exercises_equipment' => array(
'field_name' => 'exercises_equipment',
'label' => 'Equipment Used',
'widget' => array(
'type' => 'options_autocomplete',
'settings' => array('match_operator'=>'STARTS_WITH','size'=>60),
),

I'll mark this as bug. If it's a support issue please feel free to change it.

Tony

Comments

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)

Tried with latest dev?