public function _createElements() {
        if (!$this->has_customize_switch()) {
            $element = $this->createFormElement('hidden', 'customize', 1);
        } else {
            $element = $this->createFormElement('advcheckbox', 'customize', '', $this->_options['customlabel']);
        }
        $this->_elements[] = $element;

        if ($this->_options['type'] === 'text') {
            $element = $this->createFormElement($this->_options['type'], 'value',
                get_string('newvaluefor', 'form', $this->getLabel()), $this->getAttributes());
            $element->setHiddenLabel(true);
        } else if ($this->_options['type'] === 'date_selector') {
            $element = $this->createFormElement($this->_options['type'], 'value', '', $this->_options,
                $this->getAttributes());
        } else if ($this->_options['type'] === 'date_time_selector') {
            $element = $this->createFormElement($this->_options['type'], 'value', '', $this->_options,
                $this->getAttributes());
        }
        $this->_elements[] = $element;
    }