How To Carry String With Spaces Through A Html Form, Using Flask
I'm trying to build a simple online quiz using Flask and Python 3.6, using HTML forms with radio buttons to carry the selected answers between Flask routes. The first step is to se
Solution 1:
According to the HTML5 documentation, an unquoted attribute must not have an embedded space.
Your input
element expands to the following text:
<inputtype = 'radio'name= 'categories'value =NorthAmerica>
Even though you mean for it to have a value
attribute with a value of North America
, it actually has a value
attribute with a value of North
and a America
attribute with an empty value.
Try quoting the value
attribute value:
<li><inputtype = 'radio'name= 'categories'value ="{{cat}}">{{cat}}</li>
Post a Comment for "How To Carry String With Spaces Through A Html Form, Using Flask"