ONO::Lib::UI::Form

Functions

renumber();

Renumbering form.

ONO::Lib::UI::Form->renumber( $BLK_ref, $vars_ref );

save();

Save field (text input plus button).

-a auto
-p padding left 5px
-u add an upload button

ONO::Lib::UI::Form->save( $name, $value, $placeholder, $width, $BLK_ref, $switches, $alt_id );

search();

Search field.

-a auto - same as -c center, required for backward compatibility
-b mb5
-B disable button (doesn't get transparent though, nice for Ajax)
-B mb10
-c center
-f full size (larger)
-F focus (see -M for mobile disable)
-i extend id by _id (required in most cases when using JS)
-k use onkeyup instead of onkeypress
-l left (default, currently not parsed)
-m mini (smaller)
-M mobile focus disable
-r right
-R Responsive
-S prevent $js_function script code from being added (required for Ajax)

ONO::Lib::UI::Form->search( $name, $value, $placeholder, $width, $color, $switches, $js_function, $maxlength );

textarea();

Textarea.

-B replace HTML breaks by carriage returns
-c count remaining chars (only if maxlegth defined)
-C clean text that doesn't contain any letters or numbers
-H help - only use this if links can be parsed, currently only works with -c option
-i line height 125%
-I line height 150%
-l count lines in textarea
-L larger content / font
-N disable name split feature
-p pop up to height (also see -P -q -Q)
-P always pop up if there is text
-q double initial popup size (can be combined with -Q)
-Q triple initial popup size (can be combined with -q)
-s string (input type text) instead of textarea, ignores height
-t top margin 2 (can be combined with -T)
-T top margin 5 (can be combined with -t)
-u count UP instead of counting down
-w wider (95 -> 98)
-W wider (95 -> 100)

Note that using "cCpP" as switches may be a good idea in most cases

Note that "$rows" will actually limit the maximum number of rows that can be entered, this feature requires $ID to be in "id:name" format

ONO::Lib::UI::Form->textarea( $name, $text, $height, $maxlength, $placeholder, $switches, $rows );
returns: $AREA

Sub-Modules

none

Dependencies