CodeIgniter Forums
Load CI View into BS4 Modal - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Load CI View into BS4 Modal (/showthread.php?tid=73924)



Load CI View into BS4 Modal - Entai - 06-25-2019

Hi, I use the crudigniter web to get a nice crud ... now I had the "add" and the "edit" views, but I am wondering what is the way to put that views into a BS4 Modal.


RE: Load CI View into BS4 Modal - albertleao - 06-25-2019

Are you trying to do it without reloading the page? You'll have to use ajax for that


RE: Load CI View into BS4 Modal - dave friend - 06-25-2019

(06-25-2019, 08:07 AM)Entai Wrote: Hi, I use the crudigniter web to get a nice crud ... now I had the "add" and the "edit" views, but I am wondering what is the way to put that views into a BS4 Modal.


Put the HTML and BS4 CSS that defines a modal in the same view that opens the modal.


RE: Load CI View into BS4 Modal - Entai - 06-25-2019

(06-25-2019, 10:37 AM)albertleao Wrote: Are you trying to do it without reloading the page? You'll have to use ajax for that

(06-25-2019, 12:50 PM)dave friend Wrote:
(06-25-2019, 08:07 AM)Entai Wrote: Hi, I use the crudigniter web to get a nice crud ... now I had the "add" and the "edit" views, but I am wondering what is the way to put that views into a BS4 Modal.


Put the HTML and BS4 CSS that defines a modal in the same view that opens the modal.

Thx, I have found this way:

Load the view via AJAX == $("#contenidomodal").load( "<?php echo base_url().'mutual/edit/'.$id;?>" );