This isn’t my area, but I know there are lots of form scripts online that have this kind of functionality—like jQuery forms. I’m not sure how easy they are to customize, though.
Another option is to set up your form through Wufoo, a popular form building service. You can set up conditional rules depending on what options the user has selected. Here’s a video on how it’s done with Wufoo:
<script type="text/javascript">
$('#option_selector').change(refresh_inputs);
refresh_inputs();
function refresh_inputs() {
var name = $('#option_selector').attr('name');
var val = $('#option_selector').val();
$('#'+name+' div').hide();
$('#'+val).show();
}
</script>
That was exactly what I wanted, will help me a lot.
Now we need to identify which form (“div”) was filled when you click confirm, but it is now easier.