Need .innerHTML functionality but with the current form field values including input, select (selected option), and textarea.
So, given:
Try something like this...
$('#f').submit(function(e) {
e.preventDefault();
var value = $('#text').val();
if ((value != '') && $('#select').val() == '2') {
$('#text').val(value);
}
});
Demo: http://jsfiddle.net/wdm954/nEXzS/
EDIT: After reading the question again I'm thinking maybe you want to add a block of html in with the value from the previous html form. If that's the case try something along these lines...
$('#f').submit(function(e) {
e.preventDefault();
var value = $('#text').val();
if ((value != '') && $('#select').val() == '2') {
$(this).after(insertValue(value));
}
});
function insertValue(val) {
return "";
}
Demo: http://jsfiddle.net/wdm954/nEXzS/1/