Hide Input(s) Until A Radio Button or Checkbox is selected
I've got a CFFORM I'm sculpting for my family's genealogy. The first section is for people's names. I would like to hide teh inputs from teh user, unless a radio button value is selected. Most people are not adopted, but occasionally, a person may need to enter a persons's biological name as well sas their adopted name. Starting out, the form is supposed to display only FirstName, MiddleName, and LastName, but if the radio button is selected for "This person is adopted" I wish for the inputs to display for adopted information. Is there Coldfusion that will do this?
<CFFORM..etc.etc.>
<TR>
<TD><B>Biological First Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_f"
SIZE="18"
MAXLENGTH="18"
TABINDEX=1
id="txt_p_nm_bio_f"
onBlur="javascript:changeCase(this.form.txt_p_nm_first)">
</TD>
</TR><TR>
<TD><B>Biological Middle Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_m"
SIZE="18"
MAXLENGTH="18"
TABINDEX=2
id="txt_p_nm_bio_m"
onBlur="javascript:changeCase(this.form.txt_p_nm_bio_m)">
</TD>
</TR><TR>
<TD><B>Biological 2nd Middle Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_m2"
SIZE="18"
MAXLENGTH="18"
TABINDEX=3
id="txt_p_nm_bio_m2"
onBlur="javascript:changeCase(this.form.txt_p_nm_bio_m2)">
</TD>
</TR><TR>
<TD><B>Biological Last Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_l"
SIZE="18"
MAXLENGTH="18"
TABINDEX=4
id="txt_p_nm_bio_l"
onBlur="javascript:changeCase(this.form.txt_p_nm_bio_l)">
</TD>
</TR><TR>
<TD><B>Biological Maiden Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_mdn"
SIZE="18"
MAXLENGTH="18"
TABINDEX=5
id="txt_p_nm_bio_mdn"
onBlur="javascript:changeCase(this.form.txt_p_nm_bio_mdn)">
</TD>
</TR><TR>
<TD><B>Male:</B>
<CFINPUT
TYPE="radio"
NAME="rdo_p_g"
LABEL="Male"
VALUE="M">
</TD>
<TD COLSPAN="3"><B>Female:</B>
<CFINPUT
TYPE="radio"
NAME="rdo_p_g"
LABEL="Female"
VALUE="F">
</TD>
</TR>
<!--- radio buttons are linked to text field in the database, thus the letter "A" or "B" --->
<TR>
<TD><B>Biological:</B>
<CFINPUT
TYPE="radio"
NAME="rdo_p_a_b"
VALUE="A">
<TD COLSPAN="3"><B>Adopted:</B>
<CFINPUT
TYPE="radio"
NAME="rdo_p_a_b"
VALUE="B">
</TD>
</TR>
<!--- 'hoping to hide the following three inputs and labels, if the radio button selection is biological. --->
<TR>
<TD><B>Adopted First Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_adp_f"
SIZE="18"
MAXLENGTH="18"
TABINDEX=1
id="txt_p_nm_adp_f"
onBlur="javascript:changeCase(this.form.txt_p_nm_first)">
</TD>
</TR>
<TR>
<TD><B>Adopted Middle Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_adp_m"
SIZE="18"
MAXLENGTH="18"
TABINDEX=2
id="txt_p_nm_adp_m"
onBlur="javascript:changeCase(this.form.txt_p_nm_adp_m)">
</TD>
</TR>
<TR>
<TD><B>Adopted Last Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_adp_l"
SIZE="18"
MAXLENGTH="18"
TABINDEX=4
id="txt_p_nm_adp_l"
onBlur="javascript:changeCase(this.form.txt_p_nm_adp_l)">
</TD>
</TR>
<TR>
<TD><B>Adopted Maiden Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_adp"
SIZE="18"
MAXLENGTH="18"
TABINDEX=5
id="txt_p_nm_bio_adp"
onBlur="javascript:changeCase(this.form.txt_p_nm_adp_mdn)">
</TD>
</TR>
Submit, reset, /CFFORM etc.etc.
