Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a scheme for integrating formsets with pagetree's form handling #58

Open
nikolas opened this issue Mar 12, 2015 · 0 comments
Open

Comments

@nikolas
Copy link
Member

nikolas commented Mar 12, 2015

I have a custom pageblock that manages a dynamic formset, and it's not clear how I would integrate that with pagetree's pre-generated <form>.

For example, when using the "change my answers" feature with a formset, I get the error: "ManagementForm data is missing or has been tampered with"

This is related to issue #44.

nikolas added a commit to ccnmtl/worth2 that referenced this issue Mar 12, 2015
Pagetree's auto-generated <form> tag has a few problems preventing
me from using it with the goal forms:

* After submitting an invalid form, Pagetree's Submit button disappears,
preventing the user from being able to submit the form again.
* The "change my answers" form isn't compatible with formsets. See
ccnmtl/django-pagetree#58

My solution is to again have the pageblock render its own <form>. This
necessitates an unfortunate hack: hiding pagetree's Submit button with
JavaScript. This is one of the reasons I think needs_submit should be
broken out into two different configurable params: Something like
`handles_post_data` and `renders_form`. Related to issue here:
ccnmtl/django-pagetree#44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant