JohnMac328
asked on
CF - One form value fills another field value
Right now it is manually done and does work. I would like the credit earned field to automatically fill in either 1 or 0 based on the value in test status, either passed or Failed. Any help is appreciated.
<tr>
<td><select name="Test_Status">
<option value='1'#UserPass#>Passed</option>
<option value='0'#UserFail#>Fail</option>
</select></td>
<td><cfinput type="datefield" name="Test_Date"></td>
<td><select name="Credits_Earned" class="widthed">
<option value='0'>0</option>
<option value='1'>1</option>
</select></td>
</tr>
can u be more specific for what r u trying to do
ASKER
When the value of test status is selected, either a 1 or 0, then based on that the credit field will fill in with a 1 or 0
1 = Passed and then the credit field will be 1 and the opposite for Failed which is 0
1 = Passed and then the credit field will be 1 and the opposite for Failed which is 0
i would do it with javascript
take a look at this here
http://www.plus2net.com/javascript_tutorial/dropdown-list-demo.php
take a look at this here
http://www.plus2net.com/javascript_tutorial/dropdown-list-demo.php
ASKER
The link example does not work. When the category value is selected, the sub cat value never changes.
it does work . at least it will give you an idea how to do it . just right click on the screeen and select View Source
ASKER
I did copy the source, I was curious why the value in the second drop-down never changed when the value in the first drop-down is selected. I will put it in and see what happens.
ASKER
Subcat dropdown never changes value
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great, thanks
Glad I could help, thanks!