Thanks for the answer Claudio.
Are you sure it's possible to catch which button has been pressed by the user with this technic ?
Outside my ad_form, I have :
element create files ok -label "OK" -widget submit -datatype text
element create files cancel -label "Cancel" -widget submit -datatype text
element create files email -label "Email" -widget submit -datatype text
and in -after_submit :
if { [template::form get_button "files"] eq "email" } {
ad_returnredirect \
[export_vars -base attachment_email]
}
but I'm not correcly redirected when pressing the "Email" button.
I tried putting the "element create" in the -edit_request, but no change.
Thanks.