Comments: on this page. Click to read or post your own.

Class SimpleForm

Description

Form tag class to hold widget values.

Located in /sapphire/dev/simpletest/form.php (line 22)


	
			
Variable Summary
mixed $_action
mixed $_buttons
mixed $_checkboxes
mixed $_encoding
mixed $_id
mixed $_images
mixed $_method
mixed $_radios
mixed $_widgets
Method Summary
SimpleForm SimpleForm (SimpleTag $tag,  &$page, SimplePage $page)
void addWidget ( &$tag, SimpleWidget $tag)
void attachLabelBySelector (SimpleSelector $selector,  $label)
string getId ()
string getMethod ()
string/array getValue (SimpleSelector $selector)
boolean hasImage (SimpleSelector $selector)
boolean hasSubmit (SimpleSelector $selector)
void setDefaultTarget (string $frame)
boolean setField (SimpleSelector $selector, string $value, [ $position = false])
hash submit ()
SimpleEncoding submitButton (SimpleSelector $selector, [hash $additional = false])
SimpleEncoding submitImage (SimpleSelector $selector, integer $x, integer $y, [hash $additional = false])
SimpleUrl _createAction (string $action,  &$page, SimpleUrl $base)
Variables
mixed $_action (line 24)
mixed $_buttons (line 28)
mixed $_checkboxes (line 32)
mixed $_default_target (line 26)
mixed $_encoding (line 25)
mixed $_id (line 27)
mixed $_images (line 29)
mixed $_method (line 23)
mixed $_radios (line 31)
mixed $_widgets (line 30)
Methods
Constructor SimpleForm (line 39)

Starts with no held controls/widgets.

SimpleForm SimpleForm (SimpleTag $tag,  &$page, SimplePage $page)
addWidget (line 142)

Adds a tag contents to the form.

  • access: public
void addWidget ( &$tag, SimpleWidget $tag)
attachLabelBySelector (line 253)

Used by the page object to set widgets labels to external label tags.

  • access: public
void attachLabelBySelector (SimpleSelector $selector,  $label)
  • SimpleSelector $selector: Criteria to apply.
  • $label
getAction (line 105)

Absolute URL of the target.

  • return: URL target.
  • access: public
SimpleUrl getAction ()
getId (line 133)

ID field of form for unique identification.

  • return: Unique tag ID.
  • access: public
string getId ()
getMethod (line 82)

Accessor for method of form submission.

  • return: Either get or post.
  • access: public
string getMethod ()
getValue (line 208)

Extracts current value from form.

  • return: Value(s) as string or null if not set.
  • access: public
string/array getValue (SimpleSelector $selector)
  • SimpleSelector $selector: Criteria to apply.
hasImage (line 285)

Test to see if a form has an image control.

  • return: True if present.
  • access: public
boolean hasImage (SimpleSelector $selector)
  • SimpleSelector $selector: Criteria to apply.
hasSubmit (line 270)

Test to see if a form has a submit button.

  • return: True if present.
  • access: public
boolean hasSubmit (SimpleSelector $selector)
  • SimpleSelector $selector: Criteria to apply.
setDefaultTarget (line 73)

Sets the frame target within a frameset.

  • access: public
void setDefaultTarget (string $frame)
  • string $frame: Name of frame.
setField (line 231)

Sets a widget value within the form.

  • return: True if value is legal, false otherwise. If the field is not present, nothing will be set.
  • access: public
boolean setField (SimpleSelector $selector, string $value, [ $position = false])
  • SimpleSelector $selector: Criteria to apply.
  • string $value: Value to input into the widget.
  • $position
submit (line 351)

Simply submits the form without the submit button value. Used when there is only one button or it is unimportant.

  • return: Submitted values.
  • access: public
hash submit ()
submitButton (line 303)

Gets the submit values for a selected button.

  • return: Submitted values or false if there is no such button in the form.
  • access: public
SimpleEncoding submitButton (SimpleSelector $selector, [hash $additional = false])
  • SimpleSelector $selector: Criteria to apply.
  • hash $additional: Additional data for the form.
submitImage (line 329)

Gets the submit values for an image.

  • return: Submitted values or false if there is no such button in the form.
  • access: public
SimpleEncoding submitImage (SimpleSelector $selector, integer $x, integer $y, [hash $additional = false])
  • SimpleSelector $selector: Criteria to apply.
  • integer $x: X-coordinate of click.
  • integer $y: Y-coordinate of click.
  • hash $additional: Additional data for the form.
_createAction (line 93)

Combined action attribute with current location to get an absolute form target.

  • return: Absolute form target.
SimpleUrl _createAction (string $action,  &$page, SimpleUrl $base)
  • string $action: Action attribute from form tag.
  • SimpleUrl $base: Page location.
  • &$page
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:41:09 +1300 by phpDocumentor 1.3.2