cphplib_formular
cphplib_formular
([mixed $locale = "de_DE"])
Add formular error message to stack ($this->form_errors)
void
add_form_error
(string $message, [string $field = null])
-
string
$message: error message
-
string
$field: name of formular object (use , if you want more than one fields)
Calculates button string
string
fm_button
(string $name, string $value, string $onclick, [string $customize = ""])
-
string
$name: name of the button
-
string
$value: value of the button
-
string
$onclick: onclick event (e.g. javascript:...)
-
string
$customize: other tag parameter options like CLASS
checkbox for formular
string
fm_checkbox
(string $name, string $value, string $desc, [string $active_value = ""], [string $options = ""])
-
string
$name
-
string
$value
-
string
$desc: description behind checkbox
-
string
$active_value: active checkbox
-
string
$options: other optional tag parameters
calculates Date select string
string
fm_date
(array $customize, [string $options = ""])
-
array
$customize: array with the following keys: name_year = select box name for year name_month = select box name for month name_day = select box name for day name_hour = select box name for hour name_minute = select box name for minute value_year = selected year {default: current year} value_month = selected month {default: current month} value_day = selectd day {default: current day} value_hour = selected hour {default: current hour} value_minute = selected_minute {default: current minute} with_time = it true, with time and title {default: false} with_alltime = it true, with alltime event {default: false} name_alltime = name of alltime checkbox value_alltime = if "Y", it is selected {default: "N"} minute_int = minute interval 1, 5, 10 or 15 {default: 5 } with_run = true, if with run button {default: false} prefix = if defined, it will be print in front of the first select box start_year = set this, if the selection shall not start from year 1970 end_year = set this, if the selection shall not end after year 2037
-
string
$options: other tag parameters like readonly or class
close tag for HTML form
string
fm_end
()
calculates file input field
string
fm_file
(string $name, int $size, [string $onchange = ""], [string $customize = ""])
-
string
$name
-
int
$size
-
string
$onchange
-
string
$customize
Hidden field
string
fm_hidden
(string $field_name, [string $field_value = ""], [bool $mode = false])
-
string
$field_name
-
string
$field_value
-
bool
$mode: false: if empty, don't print it
calculates image button
string
fm_image
(string $name, string $image_name, string $alt_name, [string $onclick = ""], [string $customize = ""])
-
string
$name: name of the button
-
string
$image_name: image name
-
string
$alt_name: alt text for image
-
string
$onclick: onclick event (e.g. javascript:...)
-
string
$customize: other tag parameter options like CLASS
calculats input tag for formular
string
fm_input
(string $name, [string $value = ""], [mixed $size = ""], [int $maxlength = ""], [string $options = ""], [array $customize = null])
-
string
$name
-
string
$value
-
mixed
$size: smallest,small,medium (2xmedium=normal), default or big
-
int
$maxlength: maximum input length
-
string
$options: other optional tag parameters
-
array
$customize
Get day of month
string
fm_month_days
(int $month, int $year)
options with months
array
fm_month_options
()
options with quarters
array
fm_quarter_options
()
checkbox for formular
string
fm_radio
(string $name, string $value, string $desc, [string $active_value = ""], [string $alt_values = ""], [string $options = ""])
-
string
$name
-
string
$value
-
string
$desc: description behind radio button
-
string
$active_value: active radio
-
string
$alt_values: alternate active values for other radio buttons. If no other radio button is correct, that one with optional alt_values will be checked
-
string
$options: other optional tag parameters
calculates select start for formular
string
fm_select
(string $name, array $fmdata, [string $active = null], [string $options = ""], [string $onchange = ""])
-
string
$name: name of select tag
-
array
$fmdata: array with options value: desc: default: if true, this entry will be selected {default: false} convert: if true, convert to html {default: true} customize: other values like styles or ids
-
string
$active: if actuve is value a valid, this entry is selected {default: first in data array}
-
string
$options: other tag parameters
-
string
$onchange: onchange event
draw period form dialog
string
fm_select_period
(array &$uvar, [bool $with_userdef = false], [int $first_year = ""])
-
array
$uvar
-
bool
$with_userdef: true: with user defined period false: without user defined period {default}
-
int
$first_year
begining for formular (this function can only handle the session_id, if dbsession_start has been called immediately after creating the class object)
string
fm_start
([string $action = ""], [string $name = "form1"], [string $method = "post"], [bool $mode = true], [string $customize = ""])
-
string
$action: action {default: PHP_SELF}
-
string
$name: name for formular {default: void}
-
string
$method: post or get {default: post}
-
bool
$mode: false: no session_id, true: with session_id if required {default: true}
-
string
$customize: for addon parameters like enctype
calculates submit button string
string
fm_submit
(string $name, string $value, [string $customize = ""])
-
string
$name: name of the button
-
string
$value: value of the button
-
string
$customize: other formular parameters, e.g. CLASS
calculates text field for formular
string
fm_text
(string $name, [string $value = ""], [string $cols = ""], [string $rows = ""], [string $options = ""], int $text_mode, [bool $with_hidden_field = true])
-
string
$name: name of text tag
-
string
$value: content of text tag
-
string
$cols: number of colomns
-
string
$rows: number of rows
-
string
$options: other formular parameters like CLASS
-
int
$text_mode: 0: no edit options 1: no edit options, with mce 2: edit options, text active 3: edit options, mce small active 4: edit options, mce large active
-
bool
$with_hidden_field
options with years
array
fm_year_options
([int $first = ""], [int $last = ""])
-
int
$first: first available year
-
int
$last
Get error CSS class
If err_mode = false and "global_errors" are defined, no shadow class is used! (inactive)
string
get_error_class
(string $name, [bool $with_opera_color = false])
-
string
$name
-
bool
$with_opera_color
Get formular error messages
bool
get_form_errors
()
Exists a formular error
bool
is_form_error
([string $field = null])
-
string
$field: only check this field (use , if you want more than one fields) if empty all fields
Remove formular error message from error stack ($this->form_errors)
void
remove_form_error
([string $field = null])
-
string
$field: name of formular object (use , if you want more than one fields) if no field name is defined, all error messages will be deleted
show all formular errors
string
show_form_errors
()
Inherited Methods
Inherited From cphplib
cphplib::cphplib()
cphplib::age_from_birthday()
cphplib::array_rsort()
cphplib::array_sort()
cphplib::array_unique()
cphplib::browser_type()
cphplib::checkBankId()
cphplib::checkBirthday()
cphplib::checkColor()
cphplib::checkDomainName()
cphplib::checkEAN()
cphplib::checkEmail()
cphplib::checkHtmlTag()
cphplib::checkIP()
cphplib::checkMAC()
cphplib::checkNumber()
cphplib::checkNumWildcard()
cphplib::checkPassword()
cphplib::checkPhone()
cphplib::checkString()
cphplib::checkUserName()
cphplib::checkZip()
cphplib::check_php_version()
cphplib::convDate()
cphplib::convDateTime()
cphplib::convFirstLetter()
cphplib::convHtml()
cphplib::convnumSep()
cphplib::convTime()
cphplib::convToNum()
cphplib::convToTimestamp()
cphplib::convUmlaute()
cphplib::convUrl()
cphplib::countdown()
cphplib::cross_sum()
cphplib::currentDate()
cphplib::currentTime()
cphplib::date2days()
cphplib::dbsessionsub_start()
cphplib::dbsession_delete()
cphplib::dbsession_end()
cphplib::dbsession_read()
cphplib::dbsession_start()
cphplib::dbsession_write()
cphplib::db_close()
cphplib::db_connect()
cphplib::db_free_id()
cphplib::db_insert_id()
cphplib::db_next_id()
cphplib::db_seq_id()
cphplib::db_version()
cphplib::end_tag()
cphplib::fileExtension()
cphplib::file_exists()
cphplib::generate_password()
cphplib::get_base_url()
cphplib::get_client_ip()
cphplib::get_filename_from_text()
cphplib::get_fontsizes()
cphplib::get_id_string()
cphplib::get_image_size()
cphplib::get_mod_rewrite_url()
cphplib::get_user_var()
cphplib::hitcounter()
cphplib::html_head()
cphplib::html_header()
cphplib::in_multi_array()
cphplib::js_conv()
cphplib::killSpace()
cphplib::metatag_write()
cphplib::net_access()
cphplib::os_type()
cphplib::pager()
cphplib::rand_value()
cphplib::remove_magic_quotes()
cphplib::rgb2dec()
cphplib::set_format()
cphplib::set_locale()
cphplib::set_strings()
cphplib::show_dbdate()
cphplib::show_dbdatetime()
cphplib::show_error()
cphplib::sql_value()
cphplib::table_header()
cphplib::text_shorten()
cphplib::url()
cphplib::url_on_scripthost()
cphplib::validate_timestamp()