ArtiGrid
Popup Forms
Popup Forms allow you to display ArtiGrid forms inside a modal window instead of rendering the form directly on the page.
This demo shows how to configure an insert form to open in a Bootstrap 5 popup. The formDisplayInPopup() method lets you define the button text, the popup title, whether the form opens automatically, a custom CSS class for the button, and an optional icon.
In this example, the form is connected to the payments table. When the user clicks Open order registration, ArtiGrid opens the insert form inside a modal window, allowing a new record to be created without leaving the current page.
The formDisplayInPopup("Open order registration", "New Order", false, "btn btn-warning", "<i class='fa fa-circle-plus'></i>") configuration defines the button text, the modal title, the automatic display behavior, the button's CSS class, and the icon shown inside the button.
You can style the trigger button any way you like by passing your own classes — Bootstrap utilities such as btn btn-warning, or your own custom/Tailwind classes — and optionally prepend an icon.
This approach is especially useful for administrative interfaces where users need to create records while keeping the current list or page visible in the background, helping create a cleaner and more interactive experience while reducing unnecessary page navigation.
<?php
$grid = new ArtiGrid();
$grid->table('payments')
->template('bootstrap5')
->formDisplayInPopup("Open order registration", "New Order", false, "btn btn-warning", "<i class='fa fa-circle-plus'></i>");
echo $grid->render('insert');
?>