Need general purpose javascript code to hide/display entry fields on a form

P

Pat Scott

I am looking for a general purpose javascript snippet that enables me to
<div> or <span> HTML to make portions of the form be hidden and then appear.
The form contains about 12 sections and some sections can contain
subsections. When the user clicks on a checkbox, I want previously hidden
text boxes, radio buttons, text, drop down menus, and additional checkboxes
to appear. In some cases, clicking on a checkbox in a section can cause
additional previously hidden text boxes, radio buttons, text, drop down
menus, and additional checkboxes to appear.

Within each section, a list of individual names is displayed with an initial
checkbox beside each name being displayed. Clicking the checkbox beside a
name is what triggers the hidden info to be displayed. The server side
application is written in php and the field names are assigned using
brackets as the array is created. As an example the HTML checkbox beside
the first name <input type='checkbox' name='sect1custname[1]' value'First
Name'> The HTML for the next name woud be exactly the same except the name
field would be defined as name='sect1custname[2]'. All of the other input
buttons, boxes, menus, and text would use the same naming conventions so
that the server side module can correctly process the data.

I am hoping to keep this as generic as possible so that we can add, change,
and/or delete entire sections simply by creating the appropriate HTML and
surrounding it with the correct <div> or <span>. I understand that there
may need to be some javascript wrapped around the checkboxes.

If you know of , or have, or can develop the code, please send particulars
to jscott4272 at comcast dot net. If there are any costs associated with
the code, just let me know what they are. If you have any questions or need
additional information, please email them to me.

Pat Scott
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top