Pylons / deform

A Python HTML form library.
Other
416 stars 160 forks source link

Customized Form Rendering #395

Closed saiftyfirst closed 4 years ago

saiftyfirst commented 4 years ago

I was looking into rendering forms in pyramid. There is a basic example in the documentation that shows to access fields in html and render them in a more customized manner.

Screenshot from 2020-04-01 16-48-29

What is missing in the example is how in such a case, a button can be rendered. Say the form has the same schema as the example. In addition, I would like to add a submit button to the form. How can I render the button without rendering the entire form again ?

https://docs.pylonsproject.org/projects/deform/en/latest/retail.html

saiftyfirst commented 4 years ago

This is how I fixed it:

`

    </div>

`

However, new problem is, when I submit the form, if 'submit' in request.params returns false

saiftyfirst commented 4 years ago

Adding name="submit" to button tag makes it work