Public Method Details |
pxdb_input |
public void pxdb_input(integer $dt, [ integer $record_id ])
|
|
|
Parameter |
|
integer |
$dt |
|
|
Datatype for this input class. |
|
|
integer |
$record_id |
= >>null<< |
|
ID of existing record. |
|
Returns |
void |
|
read |
public void read()
|
|
Sets the contents of $_record[] if $record_id is set.
|
Returns |
void |
|
import |
public void import([ array $source ])
|
|
Warning: documentation is missing.
|
Parameter |
|
array |
$source |
= >>null<< |
|
The location of source data to use. (for upward compatibility with pxdb::import()) |
|
Returns |
void |
|
bind_widgets |
public void bind_widgets(object pxdb_widgets &$widgets)
|
|
The widget class must extend pxdb_widget and therefore must supply all methods that pxdb_widget supplies. (No checking happens to ensure this.)
|
Parameter |
|
object pxdb_widgets |
&$widgets |
|
|
pxdb_widgets Object |
|
Returns |
void |
|
set_auth_required |
public void set_auth_required([ boolean $bit ])
|
|
If auth_required is true, then you will not be able display a form without binding an authentication object.
|
Parameter |
|
boolean |
$bit |
= >>true<< |
|
to set auth_requred to. |
|
Returns |
void |
|
set_field_default |
public void set_field_default(string $field, mixed $value)
|
|
|
Parameter |
|
|
|
|
Returns |
void |
|
set_field_options |
public void set_field_options(string $field, array $options)
|
|
This function does NOT check to see that the field you are setting options for is a field that actually can use options (e.g. a relationship or pick list). $options value is expected to be an array of hashes ['value'] and ['label'] or a simple array.
|
Parameter |
|
string |
$field |
|
|
The field name (identifier) |
|
|
array |
$options |
|
|
Hash (value,label) of options to display. |
|
Returns |
void |
|
get_view |
public array get_view(string $view_name)
|
|
BEFORE calling this function. We may need to deprecate this method in favor of simply setting an instance variable with a view and folding this functionality into get_fields().
|
Parameter |
|
string |
$view_name |
|
|
The id of the view we want to display. |
|
Returns |
array Array of all typesfields rows for specified view. |
|
get_fields |
public array get_fields()
|
|
|
Returns |
array Array of all rows found by executing the SQL in _sql_get_object method. |
|
_get_fields |
public array _get_fields(array $tf_rows)
|
|
The array that this function builds is sent to get_widget() method of pxdb_widgets class.
|
Parameter |
|
array |
$tf_rows |
|
|
Rows from typesfields. |
|
Returns |
array |
|
pass_current_vars |
public string pass_current_vars()
|
|
|
Returns |
string The form elements (input type=hidden) |
|
get_current_vars |
public array get_current_vars()
|
|
|
Returns |
array Key -value pairs |
|
set_form_var |
public void set_form_var(string $name, mixed $value)
|
|
Note: this will overwrite vars of the same name that are part of the post/get vars that call invoking script.
|
Parameter |
|
string |
$name |
|
|
The name of the variable to add.as |
|
|
mixed |
$value |
|
|
The value of the variable. |
|
Returns |
void |
|
unset_form_var |
public void unset_form_var(string $name)
|
|
This is useful if you don't want all of the current vars being passed to $PHP_SELF every time the page reloads. (e.g. if the environment would cause an action to be performed.)
|
Parameter |
|
string |
$name |
|
|
The name of the variable to remove. |
|
Returns |
void |
|
pass_param_vars |
public string pass_param_vars()
|
|
|
Returns |
string The HTML form elements |
|
get_param_vars |
public array get_param_vars()
|
|
|
Returns |
array Key -value pairs |
|
hide_field |
public boolean hide_field(string $field)
|
|
This function is used to individually/manually override the settings for the current object. In this way you can make a field hidden for one particular object form.
|
Parameter |
|
string |
$field |
|
|
The fieldname (identifier or dbfield name) of field you want to hide. |
|
Returns |
boolean True /false on success of finding the matchings typesfield id. |
|
lock_field |
public boolean lock_field(string $field)
|
|
This function is used to individually/manually override the settings for the current object. In this way you can make a field read-only for one particular object form.
|
Parameter |
|
string |
$field |
|
|
The fieldname (identifier or dbfield name) of field you want to hide. |
|
Returns |
boolean True /false on success of finding the matchings typesfield id. |
|
disable_autogen |
public boolean disable_autogen([ string $field ])
|
|
By default autogen fields will not appear on input forms (because the values are calculated automatically once the form is submitted). Disabling autogen will allow the value to be manipulated.
|
Parameter |
|
string |
$field |
= >>null<< |
|
The fieldname (identifier or dbfield name) of field you want to reveal. |
|
Returns |
boolean True /false on success of finding the matching typesfield id. |
|
showform |
public void showform([ string $template, array $additional_vars ])
|
|
If no template path is given, this function will load _default/showform.tpl.
|
Parameter |
|
string |
$template |
= >>null<< |
|
The path of the template to use. |
|
|
array |
$additional_vars |
= >>null<< |
|
Hash of additional vars that should be set for the template to use. |
|
Returns |
void |
|
set_form_action |
public void set_form_action(string $action)
|
|
|
Parameter |
|
string |
$action |
|
|
The action for the form |
|
Returns |
void |
|
get_form_action |
public string get_form_action()
|
|
|
Returns |
string The form action |
|
set_form_name |
public void set_form_name(string $form_name)
|
|
|
Parameter |
|
string |
$form_name |
|
|
Name of the form. |
|
Returns |
void |
|
get_form_name |
public string get_form_name()
|
|
|
Returns |
string Form name. |
|
set_submit_label |
public void set_submit_label(string $label)
|
|
|
Parameter |
|
|
Returns |
void |
|
set_submit_vars |
public void set_submit_vars(array $params)
|
|
JavaScript is used to set form elements on click of submit button.
|
Parameter |
|
array |
$params |
|
|
Hash of varname => value that will be set (by JavaScript) on submit. |
|
Returns |
void |
|