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

Refactor to use multiple <form> tags #359

Open
matthijskooijman opened this issue Dec 7, 2020 · 0 comments
Open

Refactor to use multiple <form> tags #359

matthijskooijman opened this issue Dec 7, 2020 · 0 comments

Comments

@matthijskooijman
Copy link
Contributor

Currently, there is only one <form> tag in the entire page that is shared by all forms, which is not always ideal (i.e. in peer_reviewed_article, this requires adding a suffix to field names since all comment forms are submitted at the same time).

In #135, some changes were made to prepare for having multiple form tags (i.e. form submissions now explicitly reference their containing form and an explicit "default form" is tracked on HyphaHtmlDocument). This should be completed at some point.

A related improvement would be to turn submit buttons into normal submit buttons, rather than doing all form submits through the javascript hypha() function. This makes things simpler, and allows the browser to apply any validation (i.e. from required or type=email attributes on input fields, which are currently ignored, presumably because javascript forces form submission).

matthijskooijman added a commit that referenced this issue Dec 7, 2020
This gives the browser more information to do validation (though #359
must be fixed to actually make this effective) and allows HTMLForm to
validate these fields automatically (so this allows removing most
`$form->validateXXXField()` calls).
matthijskooijman added a commit that referenced this issue Feb 3, 2021
This gives the browser more information to do validation (though #359
must be fixed to actually make this effective) and allows HTMLForm to
validate these fields automatically (so this allows removing most
`$form->validateXXXField()` calls).
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