本文整理汇总了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