You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I encountered a bug related to how field values are rendered on numeric fields.
I am trying to dynamically change some field values after the form has been submitted. It works on StringFields for example but not on IntegerFields.
I just saw that some of that behaviour has been previously discussed (#662). I can understand the rationale that by default the user input should be displayed as entered when the form is shown again.
But as far as I know, the field's value can't be changed if the field is re-rendered. Is that correct?
My (ugly) workaround is to set field.raw_data = None as well as field.data = <NEW VALUE>.
I think I encountered a bug related to how field values are rendered on numeric fields.
I am trying to dynamically change some field values after the form has been submitted. It works on
StringField
s for example but not onIntegerField
s.Actual Behavior
Expected Behavior
Allow setting the field data on numeric fields after
formdata
is processed.So the behaviour is aligned with other non-numeric fields.
Problem
Right now, all (or most) numeric fields use
raw_data[0]
if present for the fields value in the rendered HTML output.Environment
EDIT: typo
The text was updated successfully, but these errors were encountered: