Link to home
Create AccountLog in
Avatar of lantervj
lantervjFlag for United States of America

asked on

multiple/nested cfforms

I have a cfform that has multiple cfdivs that contain cfforms so I can use cfselects. when the page is submitted not all the form elements are passed.
on the main page;
<cfdiv bind="url:/control/sitewide/cfms/DspDivSelectContacts.cfm?acronym=#QContactTypes.contact_type_acronym#&compid={SelectedCompanyId@change}" 
			id="div_#QContactTypes.contact_type_acronym#" 
							bindonload="false" />


The div;
<cfset attributes.suppresslayout2 = "true" />
<cfparam name="url.compid" default="" />
<!--- <cfdump var="#url#" /> --->
<cfif url.compid NEQ "">
<cfform name="SelectForm#url.acronym#">			
<cfinvoke component="sitewidecfc.services" method="getcontactListForSelect" compid="#url.compid#" 
specialty="#url.acronym#" returnvariable="QContactsList" />
<cfselect name="#url.acronym#">
	<cfloop query="QContactsList">
	<cfoutput>
	<option value="#id#" 
	<cfif QContactsList.id eq 0>
	   selected 
	</cfif>
	>#contactname#</option> 
	</cfoutput>
	</cfloop>
	</cfselect>
	</cfform>
</cfif>

Open in new window

Avatar of gdemaria
gdemaria
Flag of United States of America image


Did you have a question?

You really cannot nest forms, you can either duplicate some fields into several different forms, or you need to have all fields under one form.
ASKER CERTIFIED SOLUTION
Avatar of gdemaria
gdemaria
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of lantervj

ASKER

Once again, I should have caught that.  Many thanks.