tangra logo
   
[ class tree: tangra_lib ] [ index: tangra_lib ] [ all elements ]
 

Class: Guardable_Form

Source Location: /form/guardable_form.class.php

Class Guardable_Form

Class Overview

Guardable_Form is just Form with hidden fields for form_id and guard_value

Guardable_Form is intended to be used by form controllers that implement form_guard in order to protect the form from receiving duplicate submisions caused for example by pressing submit button of a form multiple times

Located in /form/guardable_form.class.php [line 40]

Tangra_Class
   |
   --Form
      |
      --Guardable_Form

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Form

Form::$action
Form::$enctype
Form::$fields
Form::$form_ok
Form::$method
Form::$name

Inherited From Form

Form::__construct()
Constructor
Form::accept_submit()
Cycles all fields and calls their accept_submit method
Form::add_field()
Adds field to the form
Form::basic_check()
Performs value check on all fields
Form::capture_submit()
Transfers values from $_POST or $_GET into html_value ofd each field
Form::create_submit_event()
Creates submit event with capture specified by $submit_name
Form::get_action()
Gets action property of the form
Form::get_enctype()
Gets encoding type
Form::get_field()
Returns field specified by $field_name
Form::get_fields()
Returns array containing all fields.
Form::get_field_html_value()
Gets field HTML value
Form::get_field_value()
Gets Field value
Form::get_method()
Gets method of form submission.
Form::get_name()
Gets form name
Form::get_submit_event()
Returns event of form submission
Form::get_submit_events()
Returns events of form submission both for <input type="submit" and <input type="image"
Form::get_submit_name()
Returns name of the submit button
Form::get_submit_x_name()
Returns name of the submit button with "_x" suffix
Form::get_submit_y_name()
Returns name of the submit button with "_y" suffix
Form::is_form_ok()
Returns status of the form
Form::is_receiving_submit()
Checks if form is receiving submit, i.e. submit_name is present in $_POST or $_GET
Form::set_enctype()
Sets encoding type.
Form::set_field_error()
Sets field error.
Form::set_field_value()
Sets value of form fiels
Form::set_method()
Sets the method of submission
Form::set_name()
Sets the name of the form
Form::translate_values_html2app()
Translates HTML values of the fields to "application" values.

Inherited From Tangra_Class

Tangra_Class::get_class_name()
Alias of get_class(). Exist because of historical reasons.
Tangra_Class::__set()
Overides PHP built-in method and just throws exception if called. Purpose - to "forbid" autosetting of nonexisting class properties.

Inherited From Form

Form::ENCODING_APPLICATION
Form::ENCODING_MULTIPART

[ Top ]
Method Summary
Guardable_Form   __construct()   Constructor

[ Top ]
Methods
Constructor __construct  [line 50]

  Guardable_Form __construct( string $name, string $action, [integer $method = Tangra_Form_Submit_Method::POST], [integer $enctype = Form::ENCODING_APPLICATION]  )

Constructor

Parameters:
string   $name:  Name of the form
string   $action:  Action page
integer   $method:  Tangra_Form_Submit_Method::POST or Tangra_Form_Submit_Method::GET
integer   $enctype:  Form::ENCODING_APPLICATION or Form::ENCODING_MULTIPART


Redefinition of:
Form::__construct()
Constructor

[ Top ]