all groups > coldfusion flash integration > may 2006 >
You're in the

coldfusion flash integration

group:

flash form error, can't use the same name more than once? need workaround


flash form error, can't use the same name more than once? need workaround johnnystacks
5/4/2006 5:44:59 PM
coldfusion flash integration: I've always written my forms to have multiple buttons, one for updating and one
for deleting. so in html I would do this:

<input type=submit name=action value=Update>
<input type=submit name=action value=Delete>

so I'm trying the same thing with flash forms in cold fusion:

<cfinput label="Update" name="action" type="submit" value="Update">
<cfinput label="Delete" name="action" type="submit" value="Delete">

but now I get this message:
2 Errors found.

Error /index.cfm:334
id 'action' was already defined on line 333

Error /index.cfm:335
id 'action' was already defined on line 333

Is there a way to make this work or do I have to either create a special
action_delete or a new form? I'd like to keep the logic the way I like.

Any suggestions?

Thanks,

John
Re: flash form error, can't use the same name more than once? need workaround The ScareCrow
5/5/2006 3:07:39 AM
Just change the name of the buttons

<input type=submit name="btn_update" value="Update">
<input type=submit name="btn_delete" value="Delete">
Re: flash form error, can't use the same name more than once? need workaround johnnystacks
5/16/2006 4:34:23 PM
I was hoping to do logic like this

<cfparam name="action" default="list">

<cfif action equal "list">
<cfelseif action equal "update">
<cfelseif action equal "detail">
<cfelseif action equal "delete">
</cfif>

So I just converted everything to html and things work the way I like. thanks
anyway. The forms don't really buy me anything.

AddThis Social Bookmark Button