- Issue created by @mglaman
- 🇫🇮Finland lauriii Finland
I'm wondering if we should introduce the textarea as an advanced option on top of the current option guided option so that you could do a bulk update multiple values easily, as well as copy and paste a list from a text editor. What I'm thinking is adding a link on top of the table with a text "Bulk edit", which would open a modal dialog with the values in a single textarea. Once you submit the form on the dialog, it will automatically populate the table based on the values you've given in the dialog. This way we would probably get best of both worlds.
- 🇺🇸United States mglaman WI, USA
The current UI kind of matches what Contentful has - where there is only the value/name and no internal value:
The issue is when you intend to use the List field as a key/value versus a general list of predefined values.
- 🇺🇸United States mglaman WI, USA
Okay, I found the source of one of my "problems." With \Drupal\field_ui\Form\FieldConfigEditForm::addAjaxCallbacks every input for a field storage setting triggers AJAX and a form rebuild. This is what was causing the machine name to constantly switch from an editable input to a label.
- Assigned to mglaman
- 🇺🇸United States mglaman WI, USA
I'm working on some ideas, I'll assign this to myself for now.
- 🇺🇸United States mglaman WI, USA
We worked on some versions of this, and it was equally difficult/confusing on what the toggle for customizing values did.
One thing I found that made an improvement was customizing the machine-name's "label" property to "Value:
$element['allowed_values']['table'][$delta]['item']['key']['#machine_name']['label'] = $this->t('Value');
There is still the problem where any text input change causes the entire form to reset and close the machine-name elements.