QUESTION: Why instead of stars, appear loading symbols (stars are not displayed), for all elements, except first
CODE:
foreach($posts as $post):
<span class="star-container">
debug($post->post_rate);
echo StarRating::widget([
'model' => $post,
'attribute' => 'post_rate',
'pluginOptions' => [
'size'=>'xs',
'filledStar' => '★',
'emptyStar' => '☆',
]
]);
</span>
endforeach;
Try to add ids or names to your widgets.
echo StarRating::widget([
'model' => $post,
'id' => $post->id
'attribute' => 'post_rate',
'pluginOptions' => [
'size'=>'xs',
'filledStar' => '★',
'emptyStar' => '☆',
]
]);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments