macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

cfform action page

Subject: cfform action page
From: "trojnfn" <webforumsuser@xxxxxxxxxxxxxx>
Date: Mon, 29 Oct 2007 22:31:35 +0000 (UTC)
Newsgroups: macromedia.coldfusion.cfml_general_discussion

When I first enter my form, thru a mainmenu,  I pass it a url.edit_flag = "No'. 
When the form is entered (returned) from another form, I pass it a 
url.edit_flag = "Yes". Basically, what I wan to do is perform an insert in the 
action page when the form is first enetered (No) and perform an edit/update 
when the form is returned from another form (Yes).

 So if the flag is "yes', I want to perform one action (add) and if the flag is 
"no" I want to perform another action (edit). This is what I have : 

 <cfif url.edit_flag is "No">
 <cfform action="add_action.cfm" method="post">
 <cfelseif url.edit_flag is "Yes">
 <cfform action="edit_action.cfm" method="post">
 </cfif>

 However, it does not like this. I get an errory saying my closing </cfform> 
needs a starting <cfform>,so it appeears both conditions fail. If I just have 
one form action, the page works. 

 Is is possible to do what I am trying to do, and if yes, what am I doing wrong 
?


<Prev in Thread] Current Thread [Next in Thread>