You make it sound so simple! I tried this...
<form>
<input type="radio" name="TMSAmembershipratesID" id="TMSAmembershipratesID1" value="Panda Skin Member"> Panda Skin
<input type="radio" name="TMSAmembershipratesID" id="TMSAmembershipratesID2" value="Platinum Member" onclick="if (document.getElementById('TMSAmembershipratesID2').checked) document.getElementById('reveal-if-active').style.display = 'block';"> Platinum (this is the trigger)
<input type="radio" name="TMSAmembershipratesID" id="TMSAmembershipratesID3" value="Gold Member"> Gold
<div id="reveal-if-active">
<input name="otherfield" id="otherfield" type="text" class="form-control">
</div>
</form>
And I have the following in my CSS:
#reveal-if-active {
display: none;
}
...but the hidden field doesn't display and checking the trigger radio button doesn't reveal it?
Awaits you pointing out the obvious. Thank you Ray.
NJ.
EDIT: It's working now, but when I select any of the other radio buttons, the revealed form field remains. So I tried to be smart and change my buttons to this:
<input type="radio" name="TMSAmembershipratesID" id="TMSAmembershipratesID1" value="Panda Skin Member" onclick="if (document.getElementById('TMSAmembershipratesID1').checked) document.getElementById('reveal-if-active').style.display = 'none';"> Panda Skin
<input type="radio" name="TMSAmembershipratesID" id="TMSAmembershipratesID2" value="Platinum Member" onclick="if (document.getElementById('TMSAmembershipratesID2').checked) document.getElementById('reveal-if-active').style.display = 'block';"> Platinum (this is the trigger)
<input type="radio" name="TMSAmembershipratesID" id="TMSAmembershipratesID3" value="Gold Member" onclick="if (document.getElementById('TMSAmembershipratesID3').checked) document.getElementById('reveal-if-active').style.display = 'none';"> Gold
Will the hidden form field still be submitted, albeit with a blank value, if it's not 'revealed'?