- Issue created by @agentrickard
- πΊπΈUnited States agentrickard Georgia (US)
Here's the form data for the two types.
Autocomplete:
field_name widget 0 target_id value
Select:
field_name widget #key_column => target_id value
- Status changed to Needs review
over 1 year ago 7:45pm 19 June 2023 - πΊπΈUnited States agentrickard Georgia (US)
I tracked this down to a mismatch in the default_value_input and form input values. (See attached screenshot).
This patch fixed it for me, but I suspect there may be a better fix, perhaps in this part of `buildForm`:
else { // TODO // I cannot figure out how to get a form element for only a // field. Maybe someone else can. // TODO Doing it this way does not allow for feild labels on // textarea widgets. $form[$field_name] = $entity->get($field_name)->defaultValuesForm($temp_form_element, $temp_form_state); }
Other parts of this IF/ELSE set the field value, but know what widget they are targetting
$form['default_value_input'][$field_name] = ....