I am having trouble figuring out how to append the values in the text field(exclude empty textboxes and corresponding checkboxes) and all the checked and unchecked values to a string in the order: name|T|F_name|F|F
I have this code, I have been trying to figure out how to make it into a single string. On submit I will send this string to my controller.
<input type="text" value="jim">
<input type="checkbox" checked="checked">
<input type="checkbox">
<input id="button_1" type="button" value="delete" ><br>
<input type="text" >
<input type="checkbox">
<input type="checkbox">
<input id="button_2" type="button" value="delete"><br>
<input type="text" value="deb">
<input type="checkbox" checked="checked">
<input type="checkbox" checked="checked">
<input id="button_3" type="button" value="delete"><br>
<input type="submit">
$(':input[type="text"]').each(function() {
if($(this).val() != "") {
nameString = $(this).val();
});
$(':checked').each(function() {
});
UPDATE