Sonya* Posted April 16 Posted April 16 (edited) I use this documentation This code is in the record Display template (Pages) does not work: <p>Member Rating: {$record->memberRating()}</p> <span data-ipsRating data-ipsRating-changeRate='true' data-ipsRating-url='{$record->url()}' data-ipsRating-value="{expression="number_format( $record->memberRating(), 1 )"}"> <input type="radio" name="ratingValue" id="ratingValue_1" value="1"> <label for="ratingValue_1">1</label> <input type="radio" name="ratingValue" id="ratingValue_2" value="2"> <label for="ratingValue_2">2</label> <input type="radio" name="ratingValue" id="ratingValue_3" value="3"> <label for="ratingValue_3">3</label> <input type="radio" name="ratingValue" id="ratingValue_4" value="4"> <label for="ratingValue_4">4</label> <input type="radio" name="ratingValue" id="ratingValue_5" value="5"> <label for="ratingValue_5">5</label> </span> When I click on a star, I can see a request: _https://mydomain.com/db1/category/record_title-r2/?csrfKey=76a58e802019f5b18f6d6b9c059df60f&rating=5 I also get a message printed out below the stars "Rating saved". But when I refresh the page, the rating is not saved. I do not see any errors, neither in Chrome console, nor in IPS system logs. Does somebody know what I miss? Thank you! Edited April 16 by Sonya*
Solution DawPi Posted April 16 Solution Posted April 16 Hi, Quote url (String; optional) If a URL is provided, it will be called via AJAX when the user clicks a star to choose a rating. The rating parameter will contain the selected value. Are you saving it in your PHP code? 🙂
Sonya* Posted April 16 Author Posted April 16 20 minutes ago, DawPi said: Hi, Are you saving it in your PHP code? 🙂 Oh, mey. You are right. 🙂
Recommended Posts