public function init() { $this->setDecorators(array('FormElements', array('ViewScript', array('viewScript' => 'distribution-field-config-sub-form.phtml', 'placement' => false)))); $this->addElement('checkbox', 'override', array('filters' => array('StringTrim'), 'class' => 'override', 'decorators' => array('ViewHelper'))); // we add fieldName as 2 fields (1 hidden, 1 disabled text) because // disabled fields are not sent by the browser when the form is submitted $this->addElement('text', 'fieldNameForView', array('filters' => array('StringTrim'), 'disabled' => true, 'class' => 'field-name', 'decorators' => array('ViewHelper'))); $this->addElement('hidden', 'fieldName', array('filters' => array('StringTrim'), 'decorators' => array('ViewHelper'))); $this->addElement('text', 'userFriendlyFieldName', array('filters' => array('StringTrim'), 'label' => 'Name:')); $this->addElement('text', 'entryMrssXslt', array('filters' => array('StringTrim'), 'label' => 'MRSS XSLT:')); $isRequired = new Kaltura_Form_Element_EnumSelect('isRequired', array('enum' => 'Kaltura_Client_ContentDistribution_Enum_DistributionFieldRequiredStatus')); $isRequired->setLabel('Required:'); $isRequired->setFilters(array('StringTrim')); $this->addElements(array($isRequired)); $this->addElement('checkbox', 'updateOnChange', array('filters' => array('StringTrim'), 'decorators' => array('ViewHelper'), 'class' => 'update-on-change', 'label' => 'Trigger Update:')); $this->addElement('text', 'updateParamsArrayString', array('filters' => array('StringTrim'), 'class' => 'update-param', 'decorators' => array('ViewHelper'))); }