Forum Moderators: open
The input field is:
<input type="hidden" name='field[537,0]' value='' />
the dropdown selection positions are:
<select name='field[539,0] >
<option value='Herr'>Herr</option>
<option value='Frau'>Frau</option>
the command I am looking for would be:
if "Herr" is selected, add "sehr geehrter" to
"field[537,0]" and if "Frau" is selected add "sehr geehrte".
How does that get done?
<select name="field[539,0]" id="field[539,0]" onChange="updateHidden(this.value);"> Then you need a function to do the updating...something like:
function updateHidden (choice) {
hiddenField = document.getElementById('fieldid');
if(choice == "Herr") { hiddenField.value = "sehr geehrter"; }
if(choice == "Frau") { hiddenField.value = "sehr geehrte"; }
}
Not tested. But you get the idea, right?