2 months ago

Pass data to modal using jquery

Posted 2 months ago by Methmi

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('', function () {


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 it

Please sign in or create an account to participate in this conversation.