ttek/tk-form

Tk Lib: Form render with DOM and PHP templates

8.0.42 2025-08-19 00:00 UTC

This package is auto-updated.

Last update: 2025-09-22 00:05:50 UTC


README

Project: ttek/tk-form Web: http://www.tropotek.com/
Authors: Michael Mifsud http://www.tropotek.com/

A Form lib for the Tk Framework

Contents

Installation

Available on Packagist (ttek/tk-form) and as such installable via Composer.

composer require ttek/tk-form

Or add the following to your composer.json file:

{
  "require": {
    "ttek/tk-form": "~8.0.0"
  }
}

TODO

  • Implement fieldsets and tabgroups using javascript and tags data or role attributes
  • Add more functionality to file uploads using jquery
  • Implement a WYSIWYG editor in javascript, idealy using classes sowe can make them selectable
  • Implement select2 for multi select fields

Form State Chart

   Create Form
       |
       |
 Add Form Fields
       |
       |
 Load Field Values
       |
       |
 if (isSubmitted) ----[YES]---------------
       |                                 |
       |                                 |
      [No]                   Load Request Into Field values
       |                                 |
       |                                 |
       |                         Validate Field Data
       |                                 |
       |                                 |
       | <----------[YES]-------  if (hasErrors)
       |                                 |
       |                                 |
       |                                [No]
       |                                 |
       |                                 |
  Render Form                   Save Data To Storage    
                                         | 
                                         |
                               Redirect To Success Page