Radio Button make a table or cells appear

  • Thread starter Thread starter Kevin Hanlon
  • Start date Start date
K

Kevin Hanlon

Hi new to frontpage ...
I would like to use a radio button
Yes/no that if 'yes' is picked a table appears
to accepet additional information
 
Not possible with the standard Front Page form handler.

You would have to program such functionality using
whatever programming language that is supported by your
host.
 
Hi Kevin,

Very easy to accomplish with a layer (DIV) but I would recommend using a check box instead of radio buttons.

In the form create a div and give it an id value of "Optional" and a style of display: none. Next create the table of optional
information inside of the div.

<div id="Optional" style="display: none;" >
<table>
....
</table>
</div>

Use an onclick event handler for the check box like so:
<input type="checkbox" value="V1" name="R1" onclick="if(this.checked) {Optional.style.display = 'block' } else
{Optional.style.display = 'none';}" >Optional Information

Now when you click and check the check box it will display the hidden fields.

Note, the optional fields will be sent as a part of the form in all cases. It is up to you to determine from the check box whether
the visitor wished to have the optional information gathered.

You may see an example of this at http://www.fpplus.com/samples/optional_information.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top