Forum Moderators: open

Message Too Old, No Replies

Form Issues - values on hidden fields - can they be linked in any way?

can value of one hidden field be used to set value on another hidden field?

         

brhodes

6:53 pm on Sep 12, 2008 (gmt 0)

10+ Year Member



I am using cascading dropdown options to set the value on a hidden field in a form to pass it to a php script to send mail...

I would like another hidden field to be set based on the value in the first hidden field...

Is this possible?

Bruce

Fotiman

3:07 pm on Sep 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Welcome to WebmasterWorld! In answer to you question, yes, it's possible to set the value of one hidden field based on the value of another. But you'll need to determine at what point to set that value because the "onchange" event will never fire for a hidden field. You might need to set it on form submit. It's simply a matter of looking up the value of field A, performing some if/then or switch logic to determine what path to take, and then setting the value of field B, all before you submit.