If you removed id="{{ $c->id }}", the error still exists?
Jul 15, 2020
6
Level 1
Pass data to modal using jquery
I need to do my edit function in the modal pop-up.
This is the button that makes modal pop-up
<a href="" id="{{ $c->id }}" type="button" data-target="#exampleModal" data-toggle="modal" class="btn btn-info btn-sm"><i class="fas fa-edit"></i></a>
This is the jquery for that
<script type="text/javascript">
$('#exampleModal').on('shown.bs.modal', function () {
$('#myInput').trigger('focus')
})
</script>
It gives the error Property [id] does not exist on this collection instance. I think the problem is with my jquery. How can I pass the projectmachine ID to the edit form using the jquery
This is the form tag and that is why it gives the error ```
``` For this, I need to pass id before. How can I pass itLevel 29
Hi @methmi, for passing data to modal, you can check this thread https://laracasts.com/discuss/channels/laravel/cannot-pass-data-to-modal
Please or to participate in this conversation.