DEV Community

Discussion on: Combining multiple forms in Flask-WTForms but validating independently

Collapse
 
jerrykco profile image
Jerry Kauffman

I was able to fix the runtime error.
And I took a completely different approach using wtforms.readthedocs.io/en/2.3.x/sp....
So I have one form but based on the model options I have two functions (one for each option) that do a del form.variable for each of the variables that are not available because the option isn't included. Seems to work well.