Avatar of earwig75
earwig75
 asked on

Increase input name by one in a loop

I am using a cfoutput query and I need to change the "name" of each radio input box for each record that is returned. The default is "auth", the 2nd should be auth1, then auth2 etc...

In the below example, each time it returns a record from the query "getAuths", the name of each radio button group should increase by one. Can someone assist?

	<cfoutput query="getAuths">
	<tr>
		<td>
			<input type="radio"  name="auth" value="yesAuth" />Authorized  <input type="radio" name="auth" value="noAuth" />Not Authorized
		</td>
	</tr>
	</cfoutput>

Open in new window

ColdFusion Language

Avatar of undefined
Last Comment
_agx_

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
_agx_

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy