Title: Message
Hey Joe,
 
Just give the submit button a name and value, and the value will get passed when the form is submitted-
 
<input type="submit" name="action" value="  Save This Record  ">
<input type="submit" name="action" value="  Delete This Record  ">
 
So in your action template, you could (in this case) do this-
 
<cfif left(trim(form.action), 4) is "save">
    <!--- Save the record --->
<cfelseif left(trim(form.action), 6) is "delete">
    <!--- Delete the record --->
</cfif>
 
I like this approach because it doesn't require _javascript_ in order to work.
 
Hope this helps,
 
Seth
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kelly, Joe
Sent: Thursday, September 23, 2004 3:22 PM
To: [EMAIL PROTECTED]
Subject: multiple submit buttons

It’s the old unanswered “nested forms” question… 

Because we can’t nest forms, but we can add multiple submit buttons, how do we pass the value of the submit button to the form processing template? 

 

This is a CF question!!  Not PHP, ASP or .NET!!

 

Thanks,

Joe Kelly

 

 

Reply via email to