If you change the name= in your example to all be the same like I did below
<input type="submit" name="submit" value="Process Order">
<input type="submit" name="submit" value="Calculate">
<input type="submit" name="submit" value="Compare">

and then use
<cfswitch expression="#submit#">
<cfcase value="Process Order">your procedure</cfcase>
<cfcase value="Calculate">your procedure</cfcase>
<cfcase value="Compare">your procedure</cfcase>
</cfswitch>
in the template you are submitting to.


----- Original Message -----
From: John McCosker <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 7:48 AM
Subject: submit buttons


> Has anyone worked a way round this?
>
> I have a form with multible submit buttons, each submit will perform a
> different procedure when submitted.
>
> I want to use the name attribute of each button to define my conditions in
> the next template e.g.
>
> <input type="submit" name="process" value="Process Order">
> <input type="submit" name="calculate" value="Calculate">
> <input type="submit" name="compare" value="Compare">
>
> <cfif isdefined("process")>
> process..
> <cfelse>
> <cfif isdefined("calculate")>
> calculate..
> <cfelse>
> <cfif isdefined("compare")>
> compare..
> </cfif>
> </cfif>
> </cfif>
>
> The only problem is the design team insist on using graphics for the form
> buttons
> the name attribute does not work with
>
> <input type="image" name="compare" src="../../images/compare.gif">
>
> neither do they want to use a class attribute and style the button which
> would work..
>
> I know I could pretermine their decision making and send them to one of
> three forms but its going to mean more work for me.
> I like this way because its cleaner.
>
> If anyone worked a way round this I would appreciate to hear from you.
>
> Cheers
>
> JMC
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to