Class TForm
TForm class
TForm displays an HTML form. Besides regular body content, it displays hidden fields, javascript blocks and files that are registered through TClientScriptManager. A TForm is required for a page that needs postback. Each page can contain at most one TForm. If multiple HTML forms are needed, please use regular HTML form tags for those forms that post to different URLs.
Constants Inherited From TControl |
AUTOMATIC_ID_PREFIX,
CLIENT_ID_SEPARATOR,
CS_CHILD_INITIALIZED,
CS_CONSTRUCTED,
CS_INITIALIZED,
CS_LOADED,
CS_PRERENDERED,
CS_STATE_LOADED,
ID_FORMAT,
ID_SEPARATOR,
IS_CHILD_CREATED,
IS_CREATING_CHILD,
IS_DISABLE_THEMING,
IS_DISABLE_VIEWSTATE,
IS_ID_SET,
IS_SKIN_APPLIED,
IS_STYLESHEET_APPLIED,
RF_ADAPTER,
RF_AUTO_BINDINGS,
RF_CHILD_STATE,
RF_CONTROLS,
RF_CONTROLSTATE,
RF_DATA_BINDINGS,
RF_EVENTS,
RF_NAMED_CONTROLS,
RF_NAMED_CONTROLS_ID,
RF_NAMED_OBJECTS,
RF_SKIN_ID,
|
Method Summary |
protected
void
|
Adds form specific attributes to renderer.
|
string
|
|
string
|
|
string
|
|
string
|
|
void
|
Registers the form with the page.
|
void
|
Renders the form.
|
void
|
Sets a button to be default one in a form.
|
void
|
|
void
|
|
Methods Inherited From TControl |
TControl::addedControl(), TControl::addParsedObject(), TControl::addToPostDataLoader(), TControl::applyStyleSheetSkin(), TControl::autoBindProperty(), TControl::autoDataBindProperties(), TControl::bindProperty(), TControl::broadcastEvent(), TControl::bubbleEvent(), TControl::clearChildState(), TControl::clearControlState(), TControl::clearNamingContainer(), TControl::clearViewState(), TControl::convertUniqueIdToClientId(), TControl::createChildControls(), TControl::createControlCollection(), TControl::dataBind(), TControl::dataBindChildren(), TControl::dataBindProperties(), TControl::ensureChildControls(), TControl::findControl(), TControl::findControlsByID(), TControl::findControlsByType(), TControl::focus(), TControl::getAdapter(), TControl::getAllowChildControls(), TControl::getAttribute(), TControl::getAttributes(), TControl::getChildControlsCreated(), TControl::getClientID(), TControl::getControls(), TControl::getControlStage(), TControl::getControlState(), TControl::getCustomData(), TControl::getEnabled(), TControl::getEnableTheming(), TControl::getEnableViewState(), TControl::getHasAdapter(), TControl::getHasAttributes(), TControl::getHasChildInitialized(), TControl::getHasControls(), TControl::getHasInitialized(), TControl::getHasLoaded(), TControl::getHasLoadedPostData(), TControl::getHasPreRendered(), TControl::getID(), TControl::getNamingContainer(), TControl::getPage(), TControl::getParent(), TControl::getRegisteredObject(), TControl::getSkinID(), TControl::getSourceTemplateControl(), TControl::getTemplateControl(), TControl::getUniqueID(), TControl::getViewState(), TControl::getVisible(), TControl::hasAttribute(), TControl::initRecursive(), TControl::isDescendentOf(), TControl::isObjectRegistered(), TControl::loadRecursive(), TControl::loadState(), TControl::loadStateRecursive(), TControl::onDataBinding(), TControl::onInit(), TControl::onLoad(), TControl::onPreRender(), TControl::onUnload(), TControl::preRenderRecursive(), TControl::raiseBubbleEvent(), TControl::registerObject(), TControl::removeAttribute(), TControl::removedControl(), TControl::render(), TControl::renderChildren(), TControl::renderControl(), TControl::saveState(), TControl::saveStateRecursive(), TControl::setAdapter(), TControl::setAttribute(), TControl::setChildControlsCreated(), TControl::setControlStage(), TControl::setControlState(), TControl::setCustomData(), TControl::setEnabled(), TControl::setEnableTheming(), TControl::setEnableViewState(), TControl::setID(), TControl::setPage(), TControl::setSkinID(), TControl::setTemplateControl(), TControl::setViewState(), TControl::setVisible(), TControl::trackViewState(), TControl::traverseChildControls(), TControl::unbindProperty(), TControl::unloadRecursive(), TControl::unregisterObject(), TControl::__get()
|
Methods Inherited From TComponent |
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
|
Method Details |
addAttributesToRender
protected void addAttributesToRender |
(THtmlWriter $writer ) |
Adds form specific attributes to renderer.
|
getDefaultButton
public string getDefaultButton |
() |
Output |
string
| id path to the default button control. |
Exception |
|
getEnctype
public string getEnctype |
() |
Output |
string
| the encoding type a browser uses to post data back to the server |
Exception |
|
getMethod
public string getMethod |
() |
Output |
string
| form submission method. Defaults to 'post'. |
Exception |
|
getName
Output |
string
| form name, which is equal to UniqueID. |
Exception |
|
onInit
public void onInit |
(mixed $param ) |
Registers the form with the page.
Input |
mixed | $param | event parameter |
Output |
Exception |
|
render
Renders the form.
|
setDefaultButton
public void setDefaultButton |
(string $value ) |
Sets a button to be default one in a form.
A default button will be clicked if a user presses 'Enter' key within the form.
Input |
string | $value | id path to the default button control. |
Output |
Exception |
|
setEnctype
public void setEnctype |
(string $value ) |
Input |
string | $value | the encoding type a browser uses to post data back to the server. Commonly used types include - application/x-www-form-urlencoded : Form data is encoded as name/value pairs. This is the standard encoding format.
- multipart/form-data : Form data is encoded as a message with a separate part for each control on the page.
- text/plain : Form data is encoded in plain text, without any control or formatting characters.
|
Output |
Exception |
|
setMethod
public void setMethod |
(string $value ) |
Input |
string | $value | form submission method. Valid values include 'post' and 'get'. |
Output |
Exception |
|
|