447072 (1) [Avatar] Offline
Page 239
Section 7.5.3
Listing 7.26

I am unable to get the JQuery mentioned to Alert when the Review Fields are blank.

I downloaded Chapter 7 and my code looks the same.

Instructions read: "For this to work we need to ensure that the form has an ID of addReview set so that the
jQuery can listen for the correct event."
- where is this done?

FYI - so far this has been a fantastic tutorial.

Jun (2) [Avatar] Offline
In location-review-form.jade, I added it to line 9:

extends layout

block content
      h1= pageHeader.title
      form#addReview.form-horizontal(action="", method="post", role="form")
        - if (error == "val")
          .alert.alert-danger(role="alert") All fields required, please try again
          label.col-xs-10.col-sm-2.control-label(for="name") Name
          label.col-xs-10.col-sm-2.control-label(for="rating") Rating
              option 5
              option 4
              option 3
              option 2
              option 1
          label.col-sm-2.control-label(for="review") Review
            textarea#review.form-control(name="review", rows="5")
        button.btn.btn-default.pull-right Add my review