JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<fieldset>
<input type='text' value='text value' />
<select>
<option value='some option' checked='checked'>opt</option>
<option value='some other option' checked='checked'>other opt</option>
</select>
<textarea>some text</textarea>
</fieldset>
<input type='submit' />
</form>
CSS
#id {
position:relative;
top:50px;
}
JavaScript
var array;
$("fieldset").change(function(event) {
$(event.target).data('changed',true);
});
$("form").submit(function() {
array = $(this).find("input, select,textarea").map(function() {
var $th = $(this);
if( $th.data('changed') ) return $(this).val();
}).get();
alert(array);
return false;
});