hi folk!!
i'm writing a new library for forms for engineV2. Later it can be added to
old engine, using
http://www.aikiframework.org/wiki/Aiki_forms_2 as guidelines.
In this version form will be encoded as:
(form(
{"id":"f_user1", "class": "important", "layout": "p-br"},
{"type":"text", "name":"username" , "size": "15" , "max-length":"30",
"placeholder":"your name"},
{"type":"text", "name":"other","label":"your name, please",
"tooltip":"separe with ," } ,
{"type":"radios", "name":"receiv"o", "list": "yes|no|remenber me later" },
{"type":"select", "name":"group","list": "SQL: SELECT id,group_description
from groups"}
)form)
(first {} for forms parameters, and the rest for fields-definition.
(the code is available in libs/Controls.php)
In this first version forms will support:
- forms: retrieving data using a SQL or table,pkey (primary key), pkeyfield,
{ "SQL": "SELECT * FROM clipart LEFT JOIN..."...} or
{ "table": "clipart", "pkey": "122"; "pkeyfield": "clipart_id"...}
- forms: saving data with { "save": "NAME_OF_SUBMIT" }.. In this case if
aiki detects the given submit in $_POST, $_GET it save record/add record
(when
no pkey is given it assumes adding).
- controls: text,password, radio, checkbox, select, hidden, textarea,
submit,reset (all html + html5), plus radios (note -s), with common html
attributes
(class, onblur, onchange, placeholder, size, maxlength...)
- but no fieldset :-(
The next steps are: expands all type fields, permission, validation,
pre-process functions.
I need your help:
- send me examples of minimal forms, or a list of minimal field type that
must be implemented.
- send me examples of desired forms..but can wait for a second version.
Be coherent: a large list of MUST support field requires more time to have
a first version.
Roger
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp