本文整理匯總了PHP中FormAction::Field方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormAction::Field方法的具體用法?PHP FormAction::Field怎麽用?PHP FormAction::Field使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FormAction
的用法示例。
在下文中一共展示了FormAction::Field方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Field
/**
* Render the field with the correct attributes
* @param array $properties
* @return FormAction
*/
public function Field($properties = array())
{
if ($this->isGrouped()) {
$this->transformToInput();
} else {
$this->transformToButton();
}
return parent::Field($properties);
}
示例2: testForTemplateForActionList
/**
* FieldList::forTemplate() for an action list returns a concatenation of Field values.
* Internally, this works by having FormAction::FieldHolder return just the field, but it's an important
* use-case to test.
*/
public function testForTemplateForActionList()
{
$set = new FieldList($a = new FormAction('A'), $b = new FormAction('B'));
$this->assertEquals($a->Field() . $b->Field(), $set->forTemplate());
}
示例3: Field
/**
* @param array $properties
* @return Field
*/
public function Field($properties = array())
{
Requirements::customScript("jQuery('#" . $this->ID() . "').click(function() { jQuery(this).parents('form').parsley().destroy();})");
return parent::Field($properties);
}
示例4: Field
/**
* @desc Overload the Field attribute to include noscript tags
* Allows the input tags to only be shown if javascript is disabled.
*/
function Field()
{
return "<noscript>" . parent::Field() . "</noscript>";
}
示例5: Field
public function Field($properties = array())
{
return parent::Field($properties);
}
示例6: Field
public function Field($properties = array())
{
$this->setAttribute('onclick', "javascript:(function(that){setTimeout(function(){if(that.form.checkValidity()){that.disabled=true;that.innerHTML='" . $this->sendingMessage . "';}},0);})(this);");
return parent::Field($properties);
}
開發者ID:spekulatius,項目名稱:silverstripe-bootstrap_extra_fields,代碼行數:5,代碼來源:BootstrapLoadingFormAction.php