You can do this via javascript - or if you have to involve a DB to insert the data from form1 before it goes to form2, you'll need to use ajax. Either way, it should only involve a couple of handfuls of js lines, if that.
If using jQuery:
<head>
<script src=" https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
<form>
<input name="text1" id="text1" />
<select name="drop1" id="drop1">
<option>first</option>
</select>
<input name="butt" id="butt" type="button" value="ClickMe" />
</form>
<script>
$('#butt').click(function(){
var text1 = $("#text1").val();
var drop1 = $('#drop1');
alert(text1);
drop1.append($('<option> </option>').val(1).html(text1));
});
</script>
</body>
Alternatively you could wrap the js at the bottom with a document.ready and place it in the head section.
Although I've placed both controls in the one form, you could place the dropdown anywhere in the page and it should be updated.
diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080