Packageindex Classtrees Modulegroups Elementlist Report XML Files
 
File: c:/www/apache/doc2//form/form_element_file.inc
PHPLib Form Rewrite 2001/03/01 - Form

form_element_file

form_commonobject
   |
  +-- form_element
     |
    +-- form_element_buttonobject
       |
      +-- form_element_file

Generates a file upload button.

 

public class form_element_file extends form_element_buttonobject

Generates a file upload button.
You can do a simple validation of the file that the user attempts toupload by checking the file name using length and regexp attributes.

AuthorsUlf Wendel <uw@netuse.de>
Version$Id: form_element_file.inc,v 1.5 2000/12/12 01:37:36 uw Exp $

 
Direct known subclasses: form_element_fileupload

Methods inherited from form_element

form_element, setup, checkconfiguration, getvalue, gettype, isbutton, getvalidator, setvalidator, freeze, unfreeze, thawout, show, validatelength, validateregex, dovalidation, react, setvalue, getjsonactivation, getcommonhtmlattributes, getfrozenhiddenelement, getfrozentable, getjs, getjsvalue, getextrajs, getname, ishidden

Methods inherited from form_commonobject

introspection

Private Method Summary

string

getInputFileTag()

Returns the input type = file tag.
void

get([ string $value ])

Returns the HTML code of the element.Warning: documentation is missing.
void

getfrozen([ string $value ])

Returns thr HTML code of the frozen element.Warning: documentation is missing.
void

validate()

Returns the result of the (serverside) validation.Warning: documentation is missing.

Fields inherited from form_element_buttonobject

$accesskey, $tabindex

Fields inherited from form_element

$flag_config_ok, $elname, $name, $value, $additional_html, $frozen, $class, $id, $style, $shared_required_fields, $required_fields, $shared_optional_fields, $method, $val_events, $js_mode, $form_name, $validator, $js_validator

Fields inherited from form_commonobject

$cr_html, $exceptions

Private Field Summary

integer

$size

HTML size attribute.
string

$accept

HTML accept attribute.
string

$length_e

Length error message.
integer

$minlength

Minimal length of the value of the element ( = user input)
integer

$maxlength

Maximum length of the value of the element ( = user input)
string

$valid_e

Regular expression error message
string

$valid_regex

Regular expression used to validate the value of the element ( = user input)
boolean

$valid_icase

Regular expression validation case insensitive?
array

$optional_fields

List of optional fields provided by a derived class.

Private Method Details

getInputFileTag

private string getInputFileTag( )

  Returns the input type = file tag.

Returns string $html

See Also get()

get

private void get( [ string $value ] )

  Returns the HTML code of the element.

Warning: documentation is missing.

Parameter
string $value = >>""<<
The value is only used with radio buttons.
If the given value is equal to the value of the
element when it was defined, the radio gets selected.
Returns void

See Also getfrozen(), show()

getfrozen

private void getfrozen( [ string $value ] )

  Returns thr HTML code of the frozen element.

Warning: documentation is missing.

Parameter
string $value = >>""<<
The value is only used with radio buttons.
If the given value is equal to the value of the
element when it was defined, the radio gets selected.
Returns void

See Also get(), show()

validate

private void validate( )

  Returns the result of the (serverside) validation.

Warning: documentation is missing.

Returns void

See Also validateLength(), validateRegEx(), doValidation()

Private Field Details

$size

private integer $size

>>-1<<

HTML size attribute.


$accept

private string $accept

>>""<<

HTML accept attribute.
Note that not all browsers support that attribute.


$length_e

private string $length_e

>>""<<

Length error message.
Error message used to indicate that the length of the value of the elementis eigther smaller than minlength or bigger than maxlength. If no messageis given the length gets not validated. Used together with maxlengthand minlength you can control the length of the user input.

See Also $minlength, $maxlength

$minlength

private integer $minlength

>><<

Minimal length of the value of the element ( = user input)

See Also $length_e, $maxlength

$maxlength

private integer $maxlength

>>-1<<

Maximum length of the value of the element ( = user input)
Used as HTML attribute (only form_element_text)as well as for the serverside validation.

See Also $length_e, $minlength

$valid_e

private string $valid_e

>>""<<

Regular expression error message
Error message used to indicate that the value of the elementdoesn't math the regular expression specified with valid_regex.If no message is given the value gets not validated. Used withvalid_regex and optionally valid_icase you can make sure thatthe user input follows certain rules, e.g. some that doa simple e-mail validation. As with to old oohforms ereg() and eregi()are used to test the value.

See Also $valid_regex, $valid_icase

$valid_regex

private string $valid_regex

>>""<<

Regular expression used to validate the value of the element ( = user input)

See Also $valid_e, $valid_icase

$valid_icase

private boolean $valid_icase

>>false<<

Regular expression validation case insensitive?

See Also $valid_e, $valid_regex

$optional_fields

private array $optional_fields

>>array ( "accesskey" => "string", "tabindex" => "integer", "size" => "integer", "accept" => "string", "length_e" => "string", "minlength" => "integer", "maxlength" => "integer", "valid_e" => "string", "valid_regex" => "string", "valid_icase" => "boolean" )<<

List of optional fields provided by a derived class.

See Also $shared_optional_fields, $required_fields


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta