Skip to content

classes_lib_controls_form_form.class

Daniel Spors edited this page Dec 19, 2023 · 3 revisions

Classes in file lib/controls/form/form.class.php

class Form

Wraps an HTML &ltform> element.

Extends: Control » Renderable

AddCheckbox

SHORTCUT Form::AddInput('checkbox',$name,$value)

AddFile

SHORTCUT Form::AddInput('file',$name,$value)

AddHidden

SHORTCUT Form::AddInput('hidden',$name,$value)

addHiddenData

Creates a set of hidden inputs from data.

Definition: public function addHiddenData($data)

Returns: static

Parameters:

  • array $data name-value pairs of data

AddInput

Creates and adds an input control $type may be one of: 'text' 'password' 'hidden' 'file' 'checkbox' returns objects of type TextInput PasswordInput HiddenInput FileInput CheckBox

Definition: public function AddInput($type, $name, $value)

Returns: Input|Control The created control

Parameters:

  • string $type See above for valid values

  • string $name name for the element created

  • string $value Value to be assigned (may be any valuetype)

AddPassword

SHORTCUT Form::AddInput('password',$name,$value)

AddSelect

SHORTCUT Form::AddInput('file',$name,$value)

AddSubmit

Creates and adds a SubmitButton.

Definition: public function AddSubmit($label)

Returns: SubmitButton The created button

Parameters:

  • string $label Label of the button

AddText

SHORTCUT Form::AddInput('text',$name,$value)

AddTextArea

SHORTCUT Form::AddInput('textarea',$name,$value)

AjaxSubmitTo

Creates a standard AJAX submit action Will create everything needed to post this form via AJAX to a PHP-side handler.

Definition: public function AjaxSubmitTo($controller, $event)

Returns: static

Parameters:

  • mixed $controller Handler object

  • string $event Handler method name

setAction

SHORTCUT Control::attr

Clone this wiki locally