View Single Post
  #3 (permalink)  
Old Apr 30th, 2007, 17:47
David Blake David Blake is offline
Junior Member
Join Date: Nov 2005
Location: Wisconsin
Age: 38
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Add/Delete/Modify Database Record form

This is the code I have now set up which functions except for one thing. When the user selects the "New Posting" option, I want it to get the insert template. However, currently I have to have a value selected for "Model" in order for it to go to the insert page which obviously doesn't make sense as the button should redirect to the insert template whether a value was selected or not. Basically, if the insert option is selected, I want the page to stop processing and redirect to the insert template. Any ideas as to how I need to revise my code?

<cfoutput>
<cfif isdefined("form.Insert")>
<cfinclude template="../Admincopy/UticaInsertPosting.cfm">
</cfif>
<cfif form.Model is "Model">
<cflocation url="UticaJobPostings.cfm?Message=Please select a Model to edit">
<cfexit>
</cfif>
<cfif IsDefined("form.edit")>
<cfinclude template="../Admincopy/UticaEditJob.cfm">
<cfelseif isdefined("form.Delete")>
<cfinclude template="../Admincopy/UticaDeleteJob.cfm">
</cfif>
</cfoutput>
Reply With Quote