claroline/claroline/inc/lib/form.lib.php File Reference

Go to the source code of this file.

Namespaces

namespace  FORM

Functions

 claro_disp_date_form ($dayFieldName, $monthFieldName, $yearFieldName, $unixDate=0, $formatMonth= 'numeric')
 claro_html_date_form ($dayFieldName, $monthFieldName, $yearFieldName, $unixDate=0, $formatMonth= 'numeric')
 claro_disp_time_form ($hourFieldName, $minuteFieldName, $unixDate=0)
 claro_html_time_form ($hourFieldName, $minuteFieldName, $unixDate=0)
 claro_html_form_select ($select_name, $list_option, $preselect=null, $attr=null, $reverted=false)
 claro_html_option_list ($list_option, $preselect, $reverted=false)
 form_required_field ($field)
 form_row ($legend, $element)
 form_input_text ($name, $value, $displayedName= '', $required=false)
 form_readonly_text ($name, $value, $displayedName= '')
 form_input_password ($name, $value, $displayedName= '', $required=false)
 form_input_hidden ($name, $value)
 form_input_textarea ($name, $value, $displayedName= '', $required=false, $rows=6)
 form_input_file ($name, $displayedName= '', $required=false)

Variables

 $formSize = 40

Function Documentation

claro_disp_date_form ( dayFieldName,
monthFieldName,
yearFieldName,
unixDate = 0,
formatMonth = 'numeric' 
)
Parameters:
string $dayFieldName attribute name of the input DAY
string $monthFieldName attribute name of the input MONTH
string $yearFieldName attribute name of the input YEAR
boolean $unixDate unix timestamp of date to display
string $formatMonth display type of month select box : numeric, long, short
Author:
Sébastien Piraux <pir@cerdecam.be>
Returns:
string html stream to output input tag for a date

Definition at line 35 of file form.lib.php.

claro_disp_time_form ( hourFieldName,
minuteFieldName,
unixDate = 0 
)

build htmlstream for input form of a time

Parameters:
string $hourFieldName attribute name of the input Hour
string $minuteFieldName attribute name of the input minutes
string $unixDate unix timestamp of date to display
Returns:
string html stream to output input tag for an hour
Author:
Sébastien Piraux <pir@cerdecam.be>

Definition at line 114 of file form.lib.php.

claro_html_date_form ( dayFieldName,
monthFieldName,
yearFieldName,
unixDate = 0,
formatMonth = 'numeric' 
)

Definition at line 46 of file form.lib.php.

claro_html_form_select ( select_name,
list_option,
preselect = null,
attr = null,
reverted = false 
)
Parameters:
string $select_name name of the form (other param can be adds with $attr
array $list_option 2D table where key are labels and value are values with reverted set to false (default) or key are values and value are labels with reverted set to true
string $preselect name of the key in $list_option would be preselected
bool $reverted set the function in reverted mode to use value => label instead of label => value arrays (default false)
Returns:
html output from a 2D table where key are name and value are label
Author:
Christophe Gesché <moosh@claroline.net>

Definition at line 176 of file form.lib.php.

claro_html_option_list ( list_option,
preselect,
reverted = false 
)

return a string as html form option list to plce in a <select>

Parameters:
array $list_option 2D table where key are labels and value are values with reverted set to false (default) or key are values and value are labels with reverted set to true
string $preselect name of the key in $list_option would be preselected
bool $reverted set the function in reverted mode to use value => label instead of label => value arrays (default false)
Returns:
html output of the select options
Author:
Christophe Gesché <moosh@claroline.net>

Definition at line 203 of file form.lib.php.

claro_html_time_form ( hourFieldName,
minuteFieldName,
unixDate = 0 
)

Definition at line 127 of file form.lib.php.

form_input_file ( name,
displayedName = '',
required = false 
)

Prepare an html output of an input file wich would be include in a <form>

Parameters:
string $name use for name and for id
Returns:
string : html stream

Definition at line 378 of file form.lib.php.

form_input_hidden ( name,
value 
)

Prepare an html output of an input hidden wich would be include in a <form>

Parameters:
string $name use for name and by default, id
string $value
Returns:
string : html stream

Definition at line 345 of file form.lib.php.

form_input_password ( name,
value,
displayedName = '',
required = false 
)

Prepare an html output of an input wich would be include in a <form>

Parameters:
string $name
string $value
string $displayedName (default '')
boolean $required (default false)
Returns:
string html content
Since:
1.8

Definition at line 326 of file form.lib.php.

form_input_text ( name,
value,
displayedName = '',
required = false 
)

Prepare an html output of an input wich would be include in a <form>

Parameters:
string $name
string $value
string $displayedName (default '')
boolean $required (default false)
Returns:
string html content
Since:
1.8

Definition at line 284 of file form.lib.php.

form_input_textarea ( name,
value,
displayedName = '',
required = false,
rows = 6 
)

Prepare an html output of an textarea wich would be include in a <form>

Parameters:
string $name
string $value
string $displayedName (default '')
boolean $required (default false)
Returns:
string html content
Since:
1.8

Definition at line 360 of file form.lib.php.

form_readonly_text ( name,
value,
displayedName = '' 
)

Prepare an html output of an input wich would be include in a <form>

Parameters:
string $name
string $value
string $displayedName (default '')
boolean $required (default false)
Returns:
string html content
Since:
1.8

Definition at line 306 of file form.lib.php.

form_required_field ( field  ) 

Return html for a field label wich is required.

Parameters:
string $field field label
Returns:
string html for a field label wich is required.
Since:
1.8

Definition at line 248 of file form.lib.php.

form_row ( legend,
element 
)

Return html for a table row for claro_form_table.

Parameters:
string $field field label
Returns:
string html for a field label wich is required.
Since:
1.8

Definition at line 261 of file form.lib.php.


Variable Documentation

$formSize = 40

Definition at line 20 of file form.lib.php.

Generated on Tue Jun 8 12:28:37 2010 for Claroline API by  doxygen 1.6.3