|
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>
|