Jump to content

ips.ui.rating - does not save anything

Go to solution Solved by DawPi,

Recommended Posts

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>

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 by Sonya*
Link to comment
Share on other sites

  • Solution



(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? 🙂

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...