fix ajax post logic to include form elements