You may be better off to name the property fields "property1",
"property2", "property3", etc., then apply the validation as required.
If there's a possibility of more than 3 properties, you might consider
asking a question at the beginning about how many properties
they'd like to insure. Then post the form back to itself, reading the
response and using that number as the control for a loop
something like this:
<CFPARAM NAME="NumberOfProperties" DEFAULT="1">
<CFIF IsDefined("Form.NumberOfProperties")>
<CFSET NumberOfProperties=Form.NumberOfProperties>
</CFIF>
<CFLOOP INDEX="i" FROM="1" TO="#NumberOfProperties#">
<INPUT TYPE="text" NAME="Property#i#">
</CFLOOP>
Gene Kraybill
On 22 Jun 2001, at 11:30, [EMAIL PROTECTED] wrote:
> Thanks for the response. You're right. The problem actually is that I have
> more than one
> field in the form with the same name. The reason for this is that the form
> allows users to apply for insurance to cover their property or properties.
> As an applicant may have more than one property to be insured, I've
> repeated the code in that part of the form dealing with property details
> three times, hence the repeat occurrance of fieldnames.
>
> At first, I only used the <input> and <form> tags. However, because I
> needed to flag the first occurrance of the various property fields as
> required, I changed these to <cfinput> and <cfform> tags, but thereby ran
> into the problem that CF doesn't allow for repeated fieldnames (and I
> couldn't flag any of these fields as 'required' or 'no null allowed' in
> Access, since that would cause an error if an applicant had only one or two
> properties to be insured, and so left any of the repeated part of the form
> blank).
>
> Here is what I need to do:
> 1. I need to be able to allow users of my form to enter in details of
> anywhere from one to three properties, either by repeating the form code or
> by some other device of which I'm presently unaware, at the same time.
> 2. I need to be able to make the fields, in the first instance of the part
> of the form dealing with property details, required fields, but not any of
> the other instances.
>
> I'd appreciate any advice.
>
> Hubert
>
> ---
> Hubert Earl
>
> ICQ#: 16199853
>
> My Jamaican Art, Craft & More Online Store:
> http://www.angelfire.com/ny/hearl/link_page_for_go_jamaica.html
> Check out the art print bargains available! Beautiful prints as low as
> US$7.50 each, less if you purchase 2 or more. Also being sold: the
> Genealogy of Jamaica CD-ROM
>
>
> ----- Original Message -----
> From: James Taavon <[EMAIL PROTECTED]>
> To: CF-Talk <[EMAIL PROTECTED]>
> Sent: Thursday, June 21, 2001 3:16 PM
> Subject: Re: Duplicate name conflict error message
>
>
> >
> > It is probably because you have two form elements with the same name.
> > Hope that helps.
> >
> >
> >
> >
> > [EMAIL PROTECTED] wrote:
> > >
> > > Hi,
> > >
> > > I'm getting a 'Duplicate name conflict' error message. I'm unable to
> solve it, because the code in which it is appearing is over 1,000 lines
> long. Also, the error message states:
> > > "The error occurred while processing an element with a general
> identifier of (CFINPUT), occupying document position (380:1) to (381:39)."
> > >
> > > This doesn't help me, because line 280 contains only the code </TR> and
> line 381 is completely blank, with nothing on it at all. I don't
> understand, therefore, how the message could refer to line 381, position 39.
> > >
> > > I'd appreciate any advice as to how to solve the error.
> > >
> > > Hubert
> > >
> > > ---
> > > Hubert Earl
> > >
> > > ICQ#: 16199853
> > >
> > > My Jamaican Art, Craft & More Online Store:
> http://www.angelfire.com/ny/hearl/link_page_for_go_jamaica.html
> > > Check out the art print bargains available! Beautiful prints as low as
> US$7.50 each, less if you purchase 2 or more. Also being sold: the
> Genealogy of Jamaica CD-ROM
> > >
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists