I have a form that has 50 text fields and a corresponding hidden field for each of these.
Ie. textfield1 hiddenfield1 etc.
When the textfield has data entered it calls a script but I want the script to change the corresponding hidden field but am stuck as to how to do this.
I have the following function which gets called:
function addOptions(currentRole)
{
document.addGroup.[‘use_role_’+currentRole].value=‘Y’;
}
Anyone able to help on how to get this work work. Where I have [‘use_role_’+currentRole] the currentRole should be replaced with the number (1 - 50) so as to change use_role_23 if currentRole is 23.
Just to transfer the value to the hidden field, it would be wise to use the onBlur event rather than the onChange. I would suggest to use the above suggested method/way with onBlur event.