Problem/Motivation
The field to set the quantity of classes per block is appearing when the field type is textfield or textarea, but it's wrong because this one will be used only with multiple items
Steps to reproduce
Go to settings page
Set field type = multi items
Set the field qty_classes_per_block = 10
Save
Open the settings page again
Update the field type to fieldset or textarea
Take a look on field "Quantity of classes per block"
Result: This field continue appering wrongly
Expected: This field shoul appear only for fieldtype = "Multiple items" because is the only used
Proposed resolution
We can implement a Drupal Form States API to remove this field when isn't necessary https://www.drupal.org/docs/drupal-apis/form-api/conditional-form-fields
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3271394.patch | 741 bytes | renatog |
Comments
Comment #2
renatog commentedPatch with the logic to remove this field when the field type is different than multiple
Comment #4
renatog commentedFixed and committed to the 2.0.x-dev branch version. Thanks