[ Index ]

PHP Cross Reference of MyBB 1.8.37

title

Body

[close]

/admin/inc/ -> class_form.php (summary)

MyBB 1.8 Copyright 2014 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 1119 lines (27 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

DefaultForm:: (20 methods):
  __construct()
  generate_hidden_field()
  generate_text_box()
  generate_numeric_field()
  generate_password_box()
  generate_file_upload_box()
  generate_text_area()
  generate_radio_button()
  generate_check_box()
  generate_select_box()
  generate_forum_select()
  generate_group_select()
  generate_prefix_select()
  generate_submit_button()
  generate_reset_button()
  generate_yes_no_radio()
  generate_on_off_radio()
  generate_date_select()
  output_submit_wrapper()
  end()

DefaultFormContainer:: (8 methods):
  __construct()
  output_row_header()
  output_row()
  output_cell()
  construct_row()
  output_row_cells()
  num_rows()
  end()


Class: DefaultForm  - X-Ref

Generate a form on the page.
__construct($script='', $method='', $id="", $allow_uploads=false, $name="", $return=false, $onsubmit="")   X-Ref
Constructor. Outputs the form tag with the specified options.
param: string $script The action for the form.
param: string $method The method (get or post) for this form.
param: string $id The ID of the form.
param: boolean $allow_uploads Should file uploads be allowed for this form?
param: string $name The name of the form
param: boolean $return Should this form be returned instead of output to the browser?
param: string $onsubmit The onsubmit action of the form

generate_hidden_field($name, $value, $options=array()   X-Ref
Generate and return a hidden field.
return: string The generated hidden
param: string $name The name of the hidden field.
param: string $value The value of the hidden field.
param: array $options Optional array of options (id)

generate_text_box($name, $value="", $options=array()   X-Ref
Generate a text box field.
return: string The generated text box.
param: string $name The name of the text box.
param: string $value The value of the text box.
param: array $options Array of options for the text box (class, style, id)

generate_numeric_field($name, $value=0, $options=array()   X-Ref
Generate a numeric field.
return: string The generated numeric box.
param: string $name The name of the numeric box.
param: int $value The value of the numeric box.
param: array $options Array of options for the numeric box (min, max, step, class, style, id)

generate_password_box($name, $value="", $options=array()   X-Ref
Generate a password input box.
return: string The generated password input box.
param: string $name The name of the password box.
param: string $value The value of the password box.
param: array $options Array of options for the password box (class, id, autocomplete)

generate_file_upload_box($name, $options=array()   X-Ref
Generate a file upload field.
return: string The generated file upload field.
param: string $name The name of the file upload field.
param: array $options Array of options for the file upload field (class, id, style)

generate_text_area($name, $value="", $options=array()   X-Ref
Generate a text area.
return: string The generated text area field.
param: string $name The name of of the text area.
param: string $value The value of the text area field.
param: array $options Array of options for text area (class, id, rows, cols, style, disabled, maxlength, readonly)

generate_radio_button($name, $value="", $label="", $options=array()   X-Ref
Generate a radio button.
return: string The generated radio button.
param: string $name The name of the radio button.
param: string $value The value of the radio button
param: string $label The label of the radio button if there is one.
param: array $options Array of options for the radio button (id, class, checked)

generate_check_box($name, $value="", $label="", $options=array()   X-Ref
Generate a checkbox.
return: string The generated check box.
param: string $name The name of the check box.
param: string $value The value of the check box.
param: string $label The label of the check box if there is one.
param: array $options Array of options for the check box (id, class, checked, onclick)

generate_select_box($name, $option_list=array()   X-Ref
Generate a select box.
return: string The select box.
param: string $name The name of the select box.
param: array $option_list Array of options in key => val format.
param: string|array $selected Either a string containing the selected item or an array containing multiple selected items (options['multiple'] must be true)
param: array $options Array of options for the select box (multiple, class, id, size)

generate_forum_select($name, $selected, $options=array()   X-Ref
Generate a forum selection box.
return: string The built select box.
param: string $name The name of the selection box.
param: array|string $selected Array/string of the selected items.
param: array Array of options (pid, main_option, multiple, depth)
param: boolean|int $is_first Is this our first iteration of this function?

generate_group_select($name, $selected=array()   X-Ref
Generate a group selection box.
return: string The built select box.
param: string $name The name of the selection box.
param: array|string $selected Array/string of the selected items.
param: array $options Array of options (class, id, multiple, size)

generate_prefix_select($name, $selected=array()   X-Ref
Generate a prefix selection box.
return: string The built select box.
param: string $name The name of the selection box.
param: array|string $selected Array/string of the selected items.
param: array $options Array of options (class, id, multiple, size)

generate_submit_button($value, $options=array()   X-Ref
Generate a submit button.
return: string The generated submit button.
param: string $value The value for the submit button.
param: array $options Array of options for the submit button (class, id, name, dsiabled, onclick)

generate_reset_button($value, $options=array()   X-Ref
Generate a reset button.
return: string The generated reset button.
param: string $value The value for the reset button.
param: array $options Array of options for the reset button (class, id, name)

generate_yes_no_radio($name, $value="1", $int=true, $yes_options=array()   X-Ref
Generate a yes/no radio button choice.
return: string The generated yes/no radio button.
param: string $name The name of the yes/no choice field.
param: string $value The value that should be checked.
param: boolean $int Using integers for the checkbox?
param: array $yes_options Array of options for the yes checkbox (@see generate_radio_button)
param: array $no_options Array of options for the no checkbox (@see generate_radio_button)

generate_on_off_radio($name, $value=1, $int=true, $on_options=array()   X-Ref
Generate an on/off radio button choice.
return: string The generated on/off radio button.
param: string $name The name of the on/off choice field.
param: int $value The value that should be checked.
param: boolean $int Using integers for the checkbox?
param: array $on_options Array of options for the on checkbox (@see generate_radio_button)
param: array $off_options Array of options for the off checkbox (@see generate_radio_button)

generate_date_select($name, $day=0,$month=0,$year=0)   X-Ref

return: string
param: string $name
param: int $day
param: int $month
param: int $year

output_submit_wrapper($buttons)   X-Ref
Output a row of buttons in a wrapped container.
return: string The submit wrapper (optional)
param: array $buttons Array of the buttons (html) to output.

end()   X-Ref
Finish up a form.
return: string The ending form tag (optional)

Class: DefaultFormContainer  - X-Ref

Generate a form container.
__construct($title='', $extra_class='')   X-Ref
Initialise the new form container.
param: string $title The title of the form container
param: string $extra_class An additional class to apply if we have one.

output_row_header($title, $extra=array()   X-Ref
Output a header row of the form container.
param: string $title The header row label.
param: array $extra Array of extra information for this header cell (class, style, colspan, width)

output_row($title, $description="", $content="", $label_for="", $options=array()   X-Ref
Output a row of the form container.
param: string $title The title of the row.
param: string $description The description of the row/field.
param: string $content The HTML content to show in the row.
param: string $label_for The ID of the control this row should be a label for.
param: array $options Array of options for the row cell.
param: array $row_options Array of options for the row container.

output_cell($data, $options=array()   X-Ref
Output a row cell for a table based form row.
param: string $data The data to show in the cell.
param: array $options Array of options for the cell (optional).

construct_row($extra=array()   X-Ref
Build a row for the table based form row.
param: array $extra Array of extra options for the cell (optional).

output_row_cells($row_id, $return=false)   X-Ref
return the cells of a row for the table based form row.
return: string The output of the row cells (optional).
param: string $row_id The id of the row.
param: boolean $return Whether or not to return or echo the resultant contents.

num_rows()   X-Ref
Count the number of rows in the form container. Useful for displaying a 'no rows' message.
return: int The number of rows in the form container.

end($return=false)   X-Ref
Output the end of the form container row.
return: string The output of the form container (optional).
param: boolean $return Whether or not to return or echo the resultant contents.



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref