Forum OpenACS Development: Re: forums: message/post

Collapse
2: Re: forums: message/post (response to 1)
Posted by Dave Bauer on
Malte,

I use the ability to have multiple buttons in a bunch of places with ad_form.

In this case ad_form creates a varaible named after the button so you can just say "if {$button ne ""} { do something }
instead of calling template::form::get_button

Collapse
Posted by Malte Sussdorff on
Dave,

sadly for this to work, ad_form still needs to be able to access the button. But it is not, due to the fact that the javascript has disabled it (just confirmed, does not work). Maybe I should rewrite formbuilder to do this:

- create a hidden form variable "button" for every form
- Change any submit button to set the hidden variable to the value of the button pressed using Javascript.
- Then disable the button.
- Then submit the form.
- Have ad_form set the variable to the passed in button.