2

Trying to set Allowed number of values always to be 1 and not allowing multiple values for a custom Drupal 8 field. How to do that? Do I need a form_ID_alter or a storageSettingsForm/defaultStorageSettings implementation?

I see this field is not included in the storageSettingsForm $form or parent::defaultStorageSettings()

Not sure if the best way is to set it as configuration or alter the form. Is there an annotation for this or something? Any example module that does this?

Thanks

  • This is also something I was looking for. I found a thread about this issue in Drupal.org (can't find right now sorry) and they are working on it. Maybe will be part of Drupal 8.4. As for myself: I didn't solve it yet. – ssibal Sep 7 '17 at 6:35
0

Problem solved in 8.4.0 :)

Full list of changes

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.