API Docs for: WebTemplate API v2.0
Show:

WTControl Class

A HTML Control

Item Index

Methods

Methods

getControlFormValue

(
  • formFieldName
  • attributeInfo
  • formValues
)
String static

Get the value from a form request which used the control

Parameters:

  • formFieldName String

    The name of the control in the form

  • attributeInfo Array

    An associative array of information about the control, should contain the key "Attribute Type"

  • formValues Array

    An associative array of the values sent in the request from the form

Returns:

String: The value for the control

getControlHTML

(
  • formFieldName
  • attributeInfo
  • value
)
String static

Return the HTML for a control
Example:
print WTControl::getControlHTML("date", Array("Attribute Type" => "Date"), "2012-01-01");

Parameters:

  • formFieldName String

    The name of the control

  • attributeInfo Array

    An associative array of information about the control, should contain the key "Attribute Type", can contain "Attribute Settings"

  • value String

    The value of the control

Returns:

String: the HTML for the control