> I have seen several examples of using multiple form
> buttons on a single form. The idea is that you can
> get the value of the respective form variable when
> you are posted and then take the appropriate action.

Usually that's triggered by the name of the form button that was clicked,
not the value.  For example, you might have two buttons:

<input type="submit" name="btnSave" value="Save">
<input type="submit" name="btnDelete" value="Delete">

On your processing page...

<cfif isDefined("form.btnSave")>
  <!--- Save changes --->
<cfelseif isDefined("form.btnDelete")>
  <!--- Delete entry --->
</cfif>

...and so on.  With HTML forms, if two or more form elements have the same
name, the values of all active form elements with that name will be put into
a comma-delimited list and show up in ColdFusion as a single variable with a
list of values, as you experienced.  This is great for checkboxes (getting a
list of the ones that were checked that share a name), but not so great for
submit buttons.


-Justin



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333215
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to