Forum OpenACS Development: Re: Using ad_form with manual edit/submit buttons

Posted by Antonio Pisano on
Haven't tried, but could work: why don't you add these "non-submit" buttons as plain ad_form widgets? something like:
ad_form -name $cookiesForm \
    -mode edit \
    -method post \
    -form {
           {html {whatever attribute}}
           {value "[_ CookieInfoButton]"}
    } \
    -edit_buttons [list [list "[_ CookieContinueButton]" "continue" ]] \
Posted by Gaven Eogan on
thanks for reply. Yes that's what we tried first to do (but didn't work for some reason) so we went for temporary hack solution of using ajax calls to modify the bootstrap classes on the buttons for now.

#jQuery - only way to change classes for now
set jquery_script [subst -nocommands {
jQuery(document).ready(function() {
jQuery("[name='formbutton\\\\:info']").addClass('btn btn-default');

I will get back to this soon and try it again when I get a chance and let you know the final solution.