Reputation: 1
I using yii star rating for restaurant system, i have 'rating' table with field 'value' for save rate from user. When user click the star, form will submit without click button Send?
Upvotes: 0
Views: 679
Reputation: 384
You can try to trigger the click on submit button, or fire submit event on the form when the user clicked on the star.
$(document).on('click', 'yourStarItemSelector', function() {
$('yourFormSelector').submit();
// or $('submitttButtonSelector').trigger('click');
})
If u use activeForm:
$(document).on('change.yii',"inputWithStarSelector", function(){
$('yourFormSelector').submit();
// or $('submitttButtonSelector').trigger('click');
});
Upvotes: 0