Problem/Motivation
Numeric element properties like #minlength and #maxlength are being saved as strings when they should be cast to integers.
Instead of saving...
textfield:
'#type': textfield
'#title': textfield
'#minlength': '1'
'#maxlength': '100'
'#size': '4'
...it should be...
textfield:
'#type': textfield
'#title': textfield
'#minlength': 1
'#maxlength': 100
'#size': 4
Proposed resolution
Save numeric element properties as integers or floats instead of strings.
Numeric properties
- autocomplete_limit
- autocomplete_match
- counter_maximum
- counter_minimum
- date_increment
- default_value
- flex
- max
- maxlength
- min
- minlength
- multiple__add_more_items
- multiple__empty_items
- multiple__min_items
- rows
- size
- step
Remaining tasks
- Write code
- Update webform plugin report
- Update existing elements
- Write test
- Write change record
User interface changes
None
API changes
None
Data model changes
Element properties can now use numeric values.
Release notes snippet
TBD
Comments
Comment #2
jrockowitz commentedComment #3
jrockowitz commentedComment #4
jrockowitz commentedComment #5
jrockowitz commentedComment #6
jrockowitz commentedThe attached webform illustrates the problem before the patch is applied.
Comment #7
jrockowitz commentedComment #8
jrockowitz commentedComment #9
jrockowitz commentedComment #11
jrockowitz commented