Closed Molkobain closed 10 years ago
Ok, so I found a way to solve my problem.
It happens because the csrf protection token input has the same name as the rating input. (I guess it because the formtype is not supposed to be used like this) So when the jQuery part applies its magic to all input having the same name, it takes the token too.
What I did to avoid this, was adding an option 'csrf_protection' => false
to the formType.
$options = array('number' => 5, 'configs' => array('readOnly' => true), 'csrf_protection' => false);
Hi,
when I use the FormType from the bundle, I always have one more star at the end. It's the hidden input token being rendered.
Does anyone else has this issue ?
Here is my test code (PHP) :
TWIG :
The result is a 6 stars rating, when hovering the last one, the title is the token value.
Thanks