Using CF8 and usableforms.js at The user will select one of the radio buttons to display the corresponding form field. Fields not selected will not display.
Radio buttons on form:
<tr>
<td class="formTitle" align="right">Select By:</td>
<td width="#variables.spacerWidth#"><img src="#application.imgSrc#dot.gif" width="1" height="1" border="0"></td>
<td valign="top" class="rowText">
<input type="radio" name="rpttype" value="PD" rel="paydate" id="type_pd" />
<label for="type_pd">Pay Date</label><br />
<input type="radio" name="rpttype" value="PC" rel="paycycle" id="type_pc" />
<label for="type_pc">Pay Cycle</label><br />
<input type="radio" name="rpttype" value="DR" rel="daterange" id="type_dr" />
<label for="type_dr">Date Range</label><br />
</td>
</tr>
Form field for pay date is:
<TR rel="paydate">
<td class="formTitle" align="right"><label for="paydate"><span class="accessibility"></span>Pay Date:</label></td>
<td width="#variables.spacerWidth#"><img src="#application.imgSrc#dot.gif" width="1" height="1" border="0"></td>
<td valign="top" class="rowText">
<SELECT name="pay_date" id="paydate" />
<cfloop query="getDates">
<option value="#getDates.PAYDATE#" <cfif getDates.PAYDATE EQ attributes.pay_date> SELECTED</cfif>>#DateFormat(getDates.PAYDATE)#</cfloop>
</SELECT>
</td>
</TR>
At the top of my form I have:
<cfparam name="attributes.pay_date" default="0">
<cfif not isdefined("attributes.pay_date")>
<cfset attributes.pay_date = "01">
</cfif>
I'm trying to pass some kind of string in those other variables that weren't selected, but I keep getting the error message:
Element PAY_DATE is undefined in ATTRIBUTES
Is there a way to do what I want to do?
Thanks,
Sherry
Radio buttons on form:
<tr>
<td class="formTitle" align="right">Select By:</td>
<td width="#variables.spacerWidth#"><img src="#application.imgSrc#dot.gif" width="1" height="1" border="0"></td>
<td valign="top" class="rowText">
<input type="radio" name="rpttype" value="PD" rel="paydate" id="type_pd" />
<label for="type_pd">Pay Date</label><br />
<input type="radio" name="rpttype" value="PC" rel="paycycle" id="type_pc" />
<label for="type_pc">Pay Cycle</label><br />
<input type="radio" name="rpttype" value="DR" rel="daterange" id="type_dr" />
<label for="type_dr">Date Range</label><br />
</td>
</tr>
Form field for pay date is:
<TR rel="paydate">
<td class="formTitle" align="right"><label for="paydate"><span class="accessibility"></span>Pay Date:</label></td>
<td width="#variables.spacerWidth#"><img src="#application.imgSrc#dot.gif" width="1" height="1" border="0"></td>
<td valign="top" class="rowText">
<SELECT name="pay_date" id="paydate" />
<cfloop query="getDates">
<option value="#getDates.PAYDATE#" <cfif getDates.PAYDATE EQ attributes.pay_date> SELECTED</cfif>>#DateFormat(getDates.PAYDATE)#</cfloop>
</SELECT>
</td>
</TR>
At the top of my form I have:
<cfparam name="attributes.pay_date" default="0">
<cfif not isdefined("attributes.pay_date")>
<cfset attributes.pay_date = "01">
</cfif>
I'm trying to pass some kind of string in those other variables that weren't selected, but I keep getting the error message:
Element PAY_DATE is undefined in ATTRIBUTES
Is there a way to do what I want to do?
Thanks,
Sherry