Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #1431 Feature Request: Tying rules/filters to submit buttons
Submitted: 2004-05-18 15:01 UTC
From: vasilyev at math dot uchicago dot edu Assigned:
Status: Wont fix Package: HTML_QuickForm
PHP Version: Irrelevant OS: irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 16 + 43 = ?

 
 [2004-05-18 15:01 UTC] vasilyev at math dot uchicago dot edu
Description: ------------ It would be desirable to be able to bound rules and filters to submit buttons. For example, if the form has two submit buttons "Update" and "Remove", I would like to perform full validation if "Update" button was pressed, and perform no (or little) validation if "Remove" button was pressed. Also, it would be nice to have a method QuickForm::isSubmitted() to see if the form was submitted (this is useful if there are several forms on one page with trackSubmit flag).

Comments

 [2004-05-19 11:16 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-05-19 16:00 UTC] vasilyev at math dot uchicago dot edu
HTML_QuickForm_Controller allows binding actions to specific buttons. What I proposed was binding rules and filters to submit buttons. This is not as important for server side validation (because you can always check what button was pressed and perform needed validation) as it is for client side validation. Even multipage form created using HTML_QuickForm_Controller won't work as expected if you try to perform client side validation - then when you press Back button the form will be validated using JavaScript (while there should not be any validation done on Back button). It would be nice to be able to at least exclude some submit buttons from client side validation. This will fix the above mentioned problem with HTML_QuickForm_Controller. I agree with your remark on isSubmitted() method. However I still think that having such a method is a good idea - it will make the code more readable.
 [2004-05-19 20:20 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!