Tuesday, December 10, 2013

Day 65

I finally figured the problem I was having trouble with last night. Basically I needed to have a new hidden input field, just as I did with the regular HTML form. The :product_id or the comments-product id needed to be the name and the value needed to be the product id for which you are commenting on, for that instance. The hidden_field just makes the form invisible to the user. The name is for the parameters that get sent to the controller page, which verifies if the form is correctly filled out. The second snippet (below) has the parameters that the comment form needs in order for it to work. You need the author, some content for that comment, and the product_id--or the product you are commenting on.


- Kyle

No comments:

Post a Comment