Search code examples
jqueryrating

Jrating and multiple ratings


I am trying to set up a rating solution. I think I will use Jrating (http://www.myjqueryplugins.com/jquery-plugin/jrating).

I just want to be sure if it is possible to have multiples ratings in one form ? Because I have a form with 5 differents rates.

Thank you for your help.


Solution

  • Yes, it's possible. Even though you use it inside a <form> it's no different from the different ratings on the demo page.

    Most UI libraries will allow you to create multiple elements that are independent of each other.

    A brief look at jRating suggests that it does not use form elements directly - i.e. you need to put code into the onSuccess handler to send the data to the server. (For example by setting the value of a hidden input element.) Since you have to do this yourself the library won't cause any conflicts with duplicate name values for input fields.