Open ErikKoinberg opened 4 months ago
A possible quick-fix that I can think of is to add something like this to the JS:
const jsonFormNumberInputs = document.querySelectorAll('input[type="number"][name*="rjf§"]'); jsonFormNumberInputs.forEach(function(input) { input.setAttribute('step', '0.01'); });
This uses the namings of the fields to add a step attribute to these. More specific querying could be used if different number fields need different step values.
I can not reproduce this.
I tried the following schema and I can add a decimal value without problems.
{
"type": "object",
"properties": {
"value": {
"type": "number",
"minimum": 1,
"maximum": 10
}
}
}
How strange. What browser were you using? After getting rendered into html, I got an input element with min and max values and a number type. When trying to submit a decimal value between the limits it did not work. I am using Firefox.
I'm also using Firefox (119).
Perhaps you could share reproducible code in a sample github repo?
A possible solution could be to add a way to add the step html attribute into the form inputs, perhaps by specifying decimalPlaces for 'number' type fields.