- Issue created by @ChrisDarke
Currently if there is a list of options (eg years) and you type in a value outside of those options, and the form reloads, the field is blank because it does not match one of the values from the options array.
This stems from an assumption in preRenderDatalist that the value is part of the options list.
Create a datelist element with values in a certain range in a simple form that reloads on submit.
Set a default value that is outside the range (this would simulate the render after form submit with a set value)
Note that the field is blank.
Add a parameter 'allow_default_outside_range' to the render element that allows it to bypass that logic, giving the user agency over the value within the field parameters, still allowing the options to be provided as a 'suggested list of options'.
Create Fork
Add changes
Create Merge Request
Test
Review
The change would allow a default field outside of the dropdown values to be present in the field on load.
Active
1.0
Code