Weirdness displaying radio button after form submissions
After submitting a form, we're displaying all the form field data, but for some reason, everything after the radio button will not display on the page.
- var display =
- "<h4>Client room</h4>" +
- $("#firstName").val() + " " +
- $("#lastName").val() + " " + "<br>" +
- $("#emailAddress").val() + " " + "<br>" +
- "Sample 1: " + $("#q1").val() + "<br>" +
- "Sample 2 " + $("#q2").val() + "<br>" +
- "Existing: " + document.getElementById("q3").value; + "<br>" +
- $("#survey1").val() + " " + "<br>" +
- $("#survey2").val() + " " + "<br>" +
- $("#survey3").val() + " " + "<br>" +
- $("#survey4").val();
- $("#result").html(display);
-
- <div class="form-group">
- <div class="radio">
- <label><input name="q3" id="q3" value="Yes" type="radio">Yes</label>
- </div>
- <div class="radio">
- <label><input name="q3" id="q3" value="No" type="radio">No</label>
- </div>
- </div>
-
- Results looks like this:
- John Doe
- johndoe@testtesttest.com
- Sample 1: Textile
- Sample 2: Wood
- Existing: Yes
- (All the survey questions should be listed here.)
Earlier I tried this, but it returned "Undefined":