PHP Database Form https://phpdatabaseform.com Generate web form from database. Simple. Thu, 25 Dec 2014 09:36:01 +0000 en-US hourly 1 https://wordpress.org/?v=7.0.4 set_mask() https://phpdatabaseform.com/docs/set_mask/ Fri, 18 Jul 2014 18:46:25 +0000 http://phpdatabaseform.com/?p=354 set_mask(mixed $col, mixed $mask, string $extra_prop)

Provides a general format to text field and enforce it’s structure as the user types in values.

It gives the user an idea about how they should enter the data.

Parameters

mixed $col
  • Column name
mixed $mask
  • Mask pattern
string $extra_prop
  • Optional. Addition properties e.g. “{placeholder: ‘(_)-____’}”. Note must single quote

phpDatabaseForm uses jQuery Mask Input created by Igor Escobar http://igorescobar.github.io/jQuery-Mask-Plugin/ available under MIT license.

]]>
add_captcha() https://phpdatabaseform.com/docs/add_captcha/ Fri, 18 Jul 2014 18:45:08 +0000 http://phpdatabaseform.com/?p=353 add_captcha() : $this

Add CAPTCHA* (“Completely Automated Public Turing test to tell Computers and Humans Apart”), a type of challenge-response test used in computing to determine whether or not the user is human.

* phpDatabaseForm uses realperson jQuery plugin available under MIT license.

]]>
add_group_header() https://phpdatabaseform.com/docs/add_group_header/ Fri, 18 Jul 2014 18:44:18 +0000 http://phpdatabaseform.com/?p=352 add_group_header(mixed $before_col, mixed $header) : $this

Add caption to a subgroup. This adds visual elements thats help users to better navigate the form

Parameters

mixed $before_col
  • column name that caption goes BEFORE
mixed $header
  • caption
]]>
redirect_after_submit() https://phpdatabaseform.com/docs/redirect_after_submit/ Fri, 18 Jul 2014 18:43:03 +0000 http://phpdatabaseform.com/?p=351 redirect_after_submit(mixed $url) : $this

Redirect form after submit. It does not check whether the submit is success.

Parameters

mixed $url
  • Redirect URL after successful form submit
]]>
load_form() https://phpdatabaseform.com/docs/load_form/ Fri, 18 Jul 2014 18:42:12 +0000 http://phpdatabaseform.com/?p=350 load_form(mixed $key) : $this

Load an existing entry from DB.

Parameters

mixed $key
  • A database table primary key value. Zero to load the very entry.
]]>
display() https://phpdatabaseform.com/docs/display/ Fri, 18 Jul 2014 18:24:32 +0000 http://phpdatabaseform.com/?p=349 display(bool $render_content)

Display our database form. This should be LAST method to call.

Parameters

bool $render_content
  • Whether to display the form or hold it in PHP buffer to be displayed later. Default to true.
]]>
set_editrule() https://phpdatabaseform.com/docs/set_editrule/ Fri, 18 Jul 2014 18:23:41 +0000 http://phpdatabaseform.com/?p=348 set_editrule(mixed $col, mixed $rule_func) : $this

Custom data validation rules. The 2nd parameter is a the JavaScript function name used for data validation.

Parameters

mixed $col
  • Column name
mixed $rule_func
  • Data rule validation JavaScript
]]>
set_maxlength() https://phpdatabaseform.com/docs/set_maxlength/ Fri, 18 Jul 2014 18:22:02 +0000 http://phpdatabaseform.com/?p=347 set_maxlength( $col, $maxlength)

Set max input length for a field

Parameters

mixed $col
  • Database table column name
int $maxlength
  • max numbers of characters allowed

 

]]>
set_ctrltype() https://phpdatabaseform.com/docs/set_ctrltype/ Fri, 18 Jul 2014 18:18:12 +0000 http://phpdatabaseform.com/?p=346 set_ctrltype(mixed $col, mixed $ctrltype, null $keyvalue_pair, bool $multiple) : $this

Set HTML control type of a specific field. Select and Textare control types are automatically determined by the database field char type based on its length. But you can set it otherwise.

Parameters

mixed $col
  • Database table column name
mixed $ctrltype
  • HTML control type.
  • Supported types:
    • text
    • textarea
    • select
    • checkbox
    • passwords
    • button
    • autocomplete
    • wysiwyg
null $keyvalue_pair
  • Key value pair or SQL SELECT(select control type only)
bool $multiple
  • Multiple select (select control type only)
]]>
set_border() https://phpdatabaseform.com/docs/set_border/ Fri, 18 Jul 2014 18:12:58 +0000 http://phpdatabaseform.com/?p=345 set_border(mixed $border_style) : $this

Set form border using CSS stylesheet

Parameters

mixed $border_style
  • border style in CSS
]]>