com-tecnick-tcexam-shared

# Procedural File: tce_functions_form.php Source Location: /shared/code/tce_functions_form.php ## Page Details: Functions to handle XHTML Form Fields. #### Tags:
author: | Nicola Asuni
copyright: | Copyright © 2004-2010, Nicola Asuni - Tecnick.com S.r.l. - ITALY - www.tecnick.com - info@tecnick.com
link: | www.tecnick.com
since: | 2001-11-07
license: | GNU Affero General Public License
### F_check_fields_format [line 127]
`array F_check_fields_format( string $formfields)`
Check fields format using regular expression comparisons. Returns a string containing a list of wrong fields (comma separated). NOTE: to check a field create a new hidden field with the same name starting with 'x_' An example powerful regular expression for email check is: ^([a-zA-Z0-9_\.\-]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$ #### Tags:
return: | containing a list of wrongfields (if any)
#### Parameters
string | $formfields | input array containing form fields
[ Top ] ### F_check_form_fields [line 157]
`false F_check_form_fields( )`
Check Form Fields. see: F_check_required_fields, F_check_fields_format #### Tags:
return: | in case of error, true otherwise
[ Top ] ### F_check_required_fields [line 93]
`array F_check_required_fields( string $formfields)`
Check Required Form Fields. Returns a string containing a list of missing fields (comma separated). #### Tags:
return: | containing a list of missing fields (if any)
#### Parameters
string | $formfields | input array containing form fields
[ Top ] ### F_close_button [line 196]
`XHTML F_close_button( [string $onclick = ''])`
Returns XHTML code string to display a window close button #### Tags:
return: | code string
#### Parameters
string | $onclick | additional javascript code to execute before closing the window.
[ Top ] ### F_decode_form_fields [line 83]
`array F_decode_form_fields( )`
Returns an array containing form fields. #### Tags:
return: | containing form fields
[ Top ] ### F_stripslashes_formfields [line 182]
`void F_stripslashes_formfields( )`
Strip slashes from posted form fields. [ Top ] ### F_submit_button [line 217]
`XHTML F_submit_button( string $name, string $value, [string $title = &quot;&quot;])`
Returns XHTML code string to display Form Submit Button. #### Tags:
return: | code string
#### Parameters
string | $name | button name
string | $value | label for button
string | $title | button title, default=""
[ Top ] Documentation generated on Mon, 06 Dec 2010 12:03:05 +0100 by phpDocumentor 1.4.3