$databaseConnection = new Patbase(database_name: "bite_sized_projects", username: "root", password: "root");
$form = new Form(databaseConnection: $databaseConnection, table: "patform_example");
$form->action("/")->method("POST")->wrapFields()->htmx()->prepareFields();
// Here is a code snippet on how you can handle same page submissions
match($_SERVER['REQUEST_METHOD']){
"GET" => $form->render(),
// You can use this if you want to make same page submissions
"POST" => $form->submit(formData: $_POST),
};-
Notifications
You must be signed in to change notification settings - Fork 0
PatrykNamyslak/PatForm
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
A form builder that fetches a tables structure and creates suitable fields, ideal for admin panels or to ease up the way of populating a table!
Resources
Stars
Watchers
Forks
Packages 0
No packages published