Source of file UserFormsGroupField.php
Size: 0,721 Bytes - Last Modified: 2018-07-16T11:15:18+00:00
/var/www/docs.ssmods.com/process/src/code/formfields/UserFormsGroupField.php
1234567891011121314151617181920212223242526272829303132 | <?php /** * Front end composite field for userforms */ class UserFormsGroupField extends UserFormsCompositeField { public function __construct($children = null) { parent::__construct($children); $this->setTag('fieldset'); } public function getLegend() { // Legend defaults to title return parent::getLegend() ?: $this->Title(); } public function processNext(EditableFormField $field) { // When ending a group, jump up one level if ($field instanceof EditableFieldGroupEnd) { return $this->getParent(); } // Otherwise behave as per normal composite field return parent::processNext($field); } } |