本文整理汇总了PHP中TextField::TextField方法的典型用法代码示例。如果您正苦于以下问题:PHP TextField::TextField方法的具体用法?PHP TextField::TextField怎么用?PHP TextField::TextField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextField
的用法示例。
在下文中一共展示了TextField::TextField方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DateTextField
/**
* Constructor: create a new dateTextField object
*
* @param object &$oForm: the form where the datefield is located on
* @param string $sName: the name of the datefield
* @param string $sMask: the mask which is used to display the fields
* @param bool $bParseOtherPresentations: try to parse other presentations of dateformat
* @return dateTextField
* @access public
* @author Thomas Branius
* @since 16-03-2010
*/
function DateTextField(&$oForm, $sName, $sMask = null, $bParseOtherPresentations = false)
{
// set the default date display
$this->setMask(!is_null($sMask) ? $sMask : FH_DATETEXTFIELD_DEFAULT_DISPLAY);
$this->_bParseOtherPresentations = $bParseOtherPresentations;
//$this->setValidator(array(&$this, "validate"));
// call the constructor of the Field class
parent::TextField($oForm, $sName);
}
示例2: ColorPicker
/**
* ColorPicker::ColorPicker()
*
* Constructor: Create a new ColorPicker object
*
* @param object &$oForm: The form where this field is located on
* @param string $sName: The name of the field
* @return ColorPicker
* @access public
* @author Rick den Haan
*/
function ColorPicker(&$oForm, $sName)
{
parent::TextField($oForm, $sName);
static $bSetJS = false;
// needed javascript included yet ?
if (!$bSetJS) {
// include the needed javascript
$bSetJS = true;
$oForm->_setJS(FH_FHTML_DIR . "js/jscolor/jscolor.js", true);
}
}
示例3: TextSelectField
/**
* TextSelectField::TextSelectField()
*
* Constructor: Create a new textfield object
*
* @param object &$oForm: The form where this field is located on
* @param string $sName: The name of the field
* @return TextField
* @author Teye Heimans
* @access public
*/
function TextSelectField(&$oForm, $sName, $aOptions)
{
parent::TextField($oForm, $sName);
static $bSetJS = false;
// needed javascript included yet ?
if (!$bSetJS) {
$bSetJS = true;
// add the needed javascript
$oForm->_setJS("function FH_CLOSE_TEXTSELECT( id )" . "\n" . "{" . "\n" . " setTimeout( 'document.getElementById(\"'+id+'\").style.display=\"none\"', 110 );" . "\n" . "}" . "\n\n" . "function FH_SET_TEXTSELECT( id, waarde )" . "\n" . "{" . "\n" . " document.getElementById(id).value=waarde;" . "\n" . " FH_CLOSE_TEXTSELECT( 'FHSpan_'+id );return false;" . "\n" . "}" . "\n\n");
}
foreach ($aOptions as $key => $value) {
$this->_sOptions .= sprintf(FH_TEXTSELECT_OPTION_MASK, $sName, $value);
}
$this->setSize(20);
$this->setMaxlength(0);
}