Hi everyone, i'm developing a new Power Portal for a customer. I have a custom grid, setted up with HTML and Lqiuid, where i show entity list records. On each row i have Edit button and Remove button. I'm struggling understanding how i can open a modal, where i have embedded an entityform in 'Edit' mode, because i don't know how i can pass the selected record id to this entityform. At the same, i have also the need to delete a record clicking on the correspond row button.
Below source code:
<div class="container">
<div class="row">
<div class="col-lg-1">Col1</div>
<div class="col-lg-1">Col2</div>
<div class="col-lg-1">Col3</div>
<div class="col-lg-1">#</div>
<div class="col-lg-1">#</div>
</div>
{% entitylist name:'myEntityList' %}{% entityview %}{% for rec in entityview.records %}
<div class="row">
<div class="col-lg-1">{{rec.col1}}</div>
<div class="col-lg-1">{{rec.col2}}</div>
<div class="col-lg-1">{{rec.col3}}</div>
<div class="col-lg-1">
<button class="btn btn-success" type="button" data-toggle="modal" data-target="#edit_modal">Edit</button>
</div>
<div class="col-lg-1">
<button class="btn btn-danger" type="button">Remove</button>
</div>
</div>
{% endfor %}{% endentityview %}{% endentitylist %}
</div>
<!--MODAL-->
<div id="edit_modal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Edit Modal</h4>
</div>
<div class="modal-body">
{% entityform name: 'myEditEntityForm' %}
</div>
</div>
</div>
</div>