troubleshooting Question

automatically filling form fields based on user selection

Avatar of jainesteer
jainesteerFlag for Australia asked on
Web Servers
14 Comments1 Solution237 ViewsLast Modified:
Hi

I am relatively new to Cold Fusion and would appreciate some help in formulating code to do the following.

I am trying to create an action page that will allow users to select a "year" with a set of corresponding subjects and subject codes.  The idea is that after the user has selected their year (#Year#) on one part of the form, they are presented with a drop-down list of subject names that apply only to that year.  The subject names, codes and offered years are stored in an Oracle table with the fields "title", "subject" and "year" (respectively).  I want it so that the user need only select the "title" and then subject name and code will automatically enter on-screen table that will accept up to 12 entries.  The names of the table fields are "SubjectName1" through to "SubjectName12" and "SubjectCode1" through to "SubjectCode12".  I only want the year to be saved into the earlier mentioned Year field.  

Further to this, I would like to find a way in which I can restrict the number of entries into these "SubjectName" and "SubjectCode" fields.  On another section of the field, there is an option where the user chooses the "duration".  Code for this is


<table width=80%><div style="text-align: left;"><tr>       
<th align=left width="200">Duration of Program</th>
<td> <input type="radio" name="Duration" value="One Semester">One Semester</input> </td>
<td>  <input type="radio" name="Duration" value="Two Semesters">Two Semesters</input> </td>
<td></td>
<td></td>
</tr></div>

It should be that if the "one semester " option is selected, the number of entries in subject names and codes is restricted to six (6); otherwise no restiction is imposed.

Help on the creation of this code is greatly appreciated.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 14 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros