vendredi 18 septembre 2020

How can I pass a hidden form input in Laravel Livewire?

Recently I had been trying to implement laravel's livewire to submit form and refresh the page without actually using the contemporary ajax based flow. It works fine for everything except that I need to send some hidden input values also which I would be changing based on the user's action before submitting the form.

<input type="text" class="w-100 ratings-hidden" value="" wire:model="rating_val">
<input class="" value=""  wire:model="reviewable_id"  type="hidden">
<textarea class="form-control w-100 animated" cols="50" id="new-review" wire:model="comment"  placeholder="Enter your review here..." rows="5"></textarea>

Here, the comment is fetched nicely after submission but I can not get the values of rating_val and reviewable_id




Aucun commentaire:

Enregistrer un commentaire