711 | | * form_attrs are regular HTML attributes which will be added to the <form> tag. |
712 | | * params are special function parameters. This can have several parameters, but most important is the db sub-array which describes the table to save form data to. |
713 | | |
714 | | * table is the database table name to save data to |
715 | | * key is the database primary key field (it is used to update data) |
716 | | * submit_name is the name of the submit html form element and is used to determine automatically when the form is submitted. |
717 | | |
718 | | * the inputs array describes every form element, and each element consists of the following fields: |
719 | | |
720 | | * type is input type, like text, textarea, etc |
721 | | * name is input the type name it also must match database field name |
722 | | * caption is the indicated form element name |
723 | | * required displays a red asterisk near the caption. Please note that it displays a red asterisk only. No real checking for mandatory fields is made if this field is true. For real checking see below. |
724 | | * checker describes the checker function for the field. This is a place where real checking takes place. |
725 | | * func is the checking function, like length, preg, avail, etc. |
726 | | * params are checking function params. Params varies depending on the exact function. |
727 | | * error is the message to display near the field if checking failed. |
728 | | * db describes the database field to save input data to. The most important is the following parameter: |
729 | | * pass is the function to pass data through, it validates data properly - to not allow an inappropriate value in a particular field. The value of this field may be Xss, XssHtml, Int, Float, Date, etc. |
| 711 | '''form_attrs''' are regular HTML attributes which will be added to the''' <form>''' tag. |
| 712 | |
| 713 | '''params''' are special function parameters. This can have several parameters, but most important is the '''db''' sub-array which describes the table to save form data to. |
| 714 | |
| 715 | * '''table''' is the database table name to save data to |
| 716 | * '''key''' is the database primary key field (it is used to update data) |
| 717 | * '''submit_name''' is the name of the submit html form element and is used to determine automatically when the form is submitted. |
| 718 | |
| 719 | the '''inputs''' array describes every form element, and each element consists of the following fields: |
| 720 | |
| 721 | * '''type''' is input type, like '''text''', '''textarea''', etc |
| 722 | * '''name''' is input the type name it also must match database field name |
| 723 | * '''caption''' is the indicated form element name |
| 724 | * '''required''' displays a red asterisk near the caption. Please note that it displays a red asterisk only. No real checking for mandatory fields is made if this field is true. For real checking see below. |
| 725 | * '''checker''' describes the checker function for the field. This is a place where real checking takes place. |
| 726 | * '''func''' is the checking function, like '''length''', '''preg''', '''avail''', etc. |
| 727 | * '''params''' are checking function params. Params varies depending on the exact function. |
| 728 | * '''error''' is the message to display near the field if checking failed. |
| 729 | * db describes the database field to save input data to. The most important is the following parameter: |
| 730 | * '''pass''' is the function to pass data through, it validates data properly - to not allow an inappropriate value in a particular field. The value of this field may be '''Xss''', '''XssHtml''', '''Int''', '''Float''', '''Date''', etc. |