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

Make pageblock forms more flexible #44

Open
nikolas opened this issue Feb 27, 2015 · 0 comments
Open

Make pageblock forms more flexible #44

nikolas opened this issue Feb 27, 2015 · 0 comments

Comments

@nikolas
Copy link
Member

nikolas commented Feb 27, 2015

We need to come up with a way to better customize pageblock forms. If you create a custom pageblock that needs to handle POST data, but you need to render your own Submit button(s) for (and possible your own <form>), there's no clear method to doing this. In the past, Susan has resorted to using JavaScript to make interface changes to custom PageBlock's forms, which shouldn't be necessary.

See discussion here:
https://frontdesk.ccnmtl.columbia.edu/logs/2015/02/27/#2015-02-27T10:37:20.577444106-05:00

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