default
[ class tree: default ] [ index: default ] [ all elements ]

Class: Sps_Form

Source Location: /sps_form.php

Class Overview

Sps
   |
   --Sps_Form

A form is a container for data; it is associated with a record in a table.


Methods


Child classes:

Sps_Form_TableSearch
A form is a container for data; it is associated with a record in a table.
Sps_Form_RecordEmail
A form is a container for data; it is associated with a record in a table.

Inherited Methods


Class Details

[line 9]
A form is a container for data; it is associated with a record in a table.

Forms are simple containers of Sps_Field objects; they don't have any logic of their own.




[ Top ]


Class Methods


method add_field [line 365]

void add_field( $conf)

Add a field to the form.



Parameters:

array   $conf   Configuration for the field, to pass to FieldFactory::create_field().

[ Top ]

method clear [line 183]

void clear( )

Calls Sps_Field::set_value() with the value NULL on each field.



[ Top ]

method conf [line 318]

void conf( $field_definitions, [ $form_definition = NULL], array $field_definitions , array $form_definition )

Configure the form.



Parameters:

array   $field_definitions    The set of field definitions. Each is passed to Sps_Form::conf().
array   $form_definition    The set of definitions specifically for the form.
array   $field_definitions  
array   $form_definition  

[ Top ]

method get_action [line 195]

void get_action( )

Gets the FORM ACTION value.



[ Top ]

method get_confirm_var [line 38]

void get_confirm_var( )



[ Top ]

method get_field [line 62]

Sps_Field get_field( string $name)

Get the named Sps_Field object.



Tags:

return:  field


Parameters:

string   $name  

[ Top ]

method get_field_value [line 82]

mixed get_field_value( string $name)

Calls Sps_Field::get_value() on the named field.



Parameters:

string   $name   Field name

[ Top ]

method get_html [line 206]

void get_html( )

Get the HTML for the form, suitable for display.



[ Top ]

method get_html_display [line 275]

string get_html_display( [integer $omit_blanks = 0])

Get the HTML for the form, in display (non-interactive) mode.



Tags:

return:  The HTML for the form


Parameters:

integer   $omit_blanks   Set to TRUE to omit empty fields.

[ Top ]

method get_html_id [line 26]

void get_html_id( )



[ Top ]

method get_html_name [line 33]

void get_html_name( )



[ Top ]

method get_js_header [line 109]

void get_js_header( )

retrieve the javascript header for this form. This is an accumulation (with duplicates removed) of the Sps_Field::get_js_header() results for all the fields. This should be placed between the HEAD tags for any page on which the form is displayed.



[ Top ]

method get_name [line 23]

void get_name( )



[ Top ]

method get_text [line 292]

void get_text( [ $omit_blanks = 0])

Gets the entire form, in text-only mode (suitable for sending by email).



Parameters:

   $omit_blanks  

[ Top ]

method is_complete [line 50]

void is_complete( )

Determine whether this form has been submitted. Does not validate, just verifies that it has received a POST of data.



[ Top ]

method load_from_data [line 382]

void load_from_data( $data)



Parameters:

array   $data  

[ Top ]

method load_from_query [line 422]

void load_from_query( )



[ Top ]

method merge [line 170]

void merge( Sps_Form &$form)



Parameters:

Sps_Form   &$form  

[ Top ]

method process_custom_delete [line 414]

void process_custom_delete( $id)



Parameters:

   $id  

[ Top ]

method process_custom_fetch [line 390]

void process_custom_fetch( $id)



Parameters:

   $id  

[ Top ]

method process_custom_insert [line 406]

void process_custom_insert( $id)



Parameters:

   $id  

[ Top ]

method process_custom_update [line 398]

void process_custom_update( $id)



Parameters:

   $id  

[ Top ]

method refresh [line 162]

void refresh( )

Calls Sps_Field::refresh() on each field.



[ Top ]

method remove_field [line 371]

void remove_field( $field_name)



Parameters:

   $field_name  

[ Top ]

method set_context [line 430]

void set_context( $id, $table_name, $primary_key, $db_name)



Parameters:

   $id  
   $table_name  
   $primary_key  
   $db_name  

[ Top ]

method set_field_value [line 93]

void set_field_value( $name, $value)

Calls on the named field.



Parameters:

   $name  
   $value  

[ Top ]

method set_name [line 24]

void set_name( $name)



Parameters:

   $name  

[ Top ]

method validate [line 135]

integer validate( )

Call Sps_Field::validate() on each field.



Tags:

return:  1 for valid; 0 for invalid. Also raises an error for invalid.


[ Top ]


Documentation generated on Mon, 23 Apr 2007 09:51:02 -0500 by phpDocumentor 1.3.0RC6