['i5', 'i3', 'i4'], ]; protected function _doInsert() { $form = $this->_getNewForm(); if ($form->validate()) { $data = $form->getValues(); $form->getElement('dump')->setValue(nl2br(var_export($data, true))); } $this->_addFormItem($form); return $this; } protected function _getNewForm(array $options = []) { $form = new Qs_Form($this->_getFormOptions()); $form->addElement('hidden', 'action', ['value' => 'insert']); $this->_bindFormFields($form); return $form; } protected function _bindFormFields(Qs_Form $form) { $options = [ 'i0' => 'Number: 0', 'i1' => 'Number: 1', 'i2' => 'Number: 2', 'i3' => 'Number: 3', 'i4' => 'Number: 4', 'i5' => 'Number: 5', 'i6' => 'Number: 6', 'i7' => 'Number: 7', 'i8' => 'Number: 8', 'i9' => 'Number: 9', 'i10' => 'Number: 10', 'i11' => 'Number: 11', 'i12' => 'Number: 12', 'i13' => 'Number: 13', 'i14' => 'Number: 14', 'i15' => 'Number: 15', 'i16' => 'Number: 16', 'i17' => 'Number: 17', 'i18' => 'Number: 18', 'i19' => 'Number: 19', 'i20' => 'Number: 20', 'i21' => 'Number: 21', 'i22' => 'Number: 22', 'i23' => 'Number: 23', 'i24' => 'Number: 24', 'i25' => 'Number: 25', 'i26' => 'Number: 26', 'i27' => 'Number: 27', 'i28' => 'Number: 28', 'i29' => 'Number: 29', 'i30' => 'Number: 30', 'i31' => 'Number: 31', 'i32' => 'Number: 32', 'i33' => 'Number: 33', 'i34' => 'Number: 34', 'i35' => 'Number: 35', 'i36' => 'Number: 36', 'i37' => 'Number: 37', 'i38' => 'Number: 38', 'i39' => 'Number: 39', 'i40' => 'Number: 40', 'i41' => 'Number: 41', 'i42' => 'Number: 42', 'i43' => 'Number: 43', 'i44' => 'Number: 44', 'i45' => 'Number: 45', 'i46' => 'Number: 46', 'i47' => 'Number: 47', 'i48' => 'Number: 48', 'i49' => 'Number: 49', 'i50' => 'Number: 50', ]; $form->addElement('static', 'dump', ['label' => 'SUBMITTED VALUES']); $form->addElement( 'multiDraggableSelect', 'element', [ 'label' => 'ExtendedMultiselect', 'width' => '80%', 'height' => 500, 'required' => true, 'multiOptions' => $options, ] ); $form->addElement( 'select', 'element2', [ 'label' => 'MultipleSelect', 'multiple' => 'multiple', 'required' => true, 'multiOptions' => $options, ] ); $form->addElement( 'select', 'element3', [ 'label' => 'Select', 'required' => true, 'multiOptions' => ['' => ''] + $options, ] ); return $this; } }