BenOSP(Abass Ben Cheik Open-Source Project) php form builder

v1.0.17 2021-11-13 16:38 UTC

This package is auto-updated.

Last update: 2024-07-12 21:05:46 UTC



$ composer require benosp/formbuilder

Basic usage

require_once './vendor/autoload.php';

$form = (new \BenOSP\FormBuilder)

->add('text', [
   'name' => "subject",
   "label" => "📝"

])->add("text", [
    "name" => "level",
    "label" => "📶"
])->add("dateTime", [
    "name" => "createdAt",
    "label" => "📆"

    "name" => "➕"



<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Form builder</title>
  <link rel="stylesheet" href="assets/bootstrap/dist/css/bootstrap.min.css">
    <body class="container">
        <?php $form->build() ?>

*NOTE You can delete the method below after running the script for the first time. This is to build the bootstrap script in the public/assets/ folder for example


This form builder was already tested on the nigatedev framework to-do demo