Skip to content

v0.1.0

Choose a tag to compare

@etus-ephraitech etus-ephraitech released this 27 Oct 20:11
· 19 commits to master since this release

First release of ephraitech/ci4-forms: a form builder for CodeIgniter 4.7+.

Define a form once in PHP and the package renders it with Bootstrap 5, validates it
with CodeIgniter's Validation service, repopulates input after errors, and returns
only clean data for the fields you defined.

Highlights

  • Form classes (define()) and inline forms (Form::make())
  • 13 field types: text, email, password, number, tel, url, date, hidden, textarea,
    select (with option groups), radio, checkbox, submit
  • validate() from POST, GET or JSON requests; validated() returns only defined fields,
    trimmed, with empty strings as null and unticked checkboxes as 0
  • Works with both re-rendering and redirect()->withInput(), including manual errors
    from setError()
  • fill() for edit screens from arrays or Entities; PUT/PATCH/DELETE spoofing
  • Escaped, accessible Bootstrap 5 markup; custom layouts with field() and control()
  • php spark forms:publish to customise the views

Requirements

PHP 8.2+ and CodeIgniter 4.7+.

See the README for full documentation.