gr4devel Posted September 10, 2014 Share Posted September 10, 2014 (edited) Hi community. Today I'm trying to figuring out if it is possible to have ONE Helper Form that handles multiple submit actions. I know that already someone on the forum had the same need but didn't get any help. I hope I'll be more lucky. Thanks in advance. Cheers. Edited September 10, 2014 by gr4devel (see edit history) Link to comment Share on other sites More sharing options...
PhpMadman Posted September 10, 2014 Share Posted September 10, 2014 No. I don't think it is. HelperForm is constructed to use either default 'submitAdd'.$this->table; or a customer submit function by defining $helper->submit_action in your helperForm What would be the point of having multiple submit buttons? Link to comment Share on other sites More sharing options...
gr4devel Posted September 10, 2014 Author Share Posted September 10, 2014 Thanks PhpMadman, the point is to have the same form (and related Helper) that can handle different type of submission. In this way you only have one Helper with all the related initialization configurations. My question raised from the fact that, without the possibility to have multiple submit actions "attached" to the same form, it would be necessary to instantiate multiple forms and so multiple Helpers that would have all the same configurations except for the submit action. Moreover my question came up by looking at the possibility to have different fieldsets for each helper. I hope I was clear enough. If this is not the case don't hesitate to ask Cheers. Link to comment Share on other sites More sharing options...
gr4devel Posted September 10, 2014 Author Share Posted September 10, 2014 Ok, I found the solution. To accomplish what I need you should not bind multiple actions to the same Form Helper but simply specify a different name for each different submit input type defined for the Helper. I wasn't clear enough don't hesitate to ask for clarifications. Cheers! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now