2

I have add new custom fields to customer group (adminhtml) but value not save.

For add new field into customer group I have override below file:

Block/Adminhtml/Group/Edit/Form.php

$form = $this->getForm();
$fs = $form->getElement('base_fieldset');
//$groupId = $this->_coreRegistry->registry( RegistryConstants::CURRENT_GROUP_ID);
$fs->addField(
    'display_status',
     'select',
     [
         'label' => __('Status'),
         'title' => __('Status'),
         'name' => 'display_status',
         'required' => true,
         'options' => [
             '1' => __('Enabled'), 
             '0' => __('Disabled')],
         ]
);
$this->setForm($form); 

Is there any need to override any model for save value?

Please guide me thanks

  • 1
    Which is your Magento version? – Khoa TruongDinh Mar 6 '17 at 15:07
  • Did you add table to save your data? If yes please share that code – Neha Raval Mar 6 '17 at 19:02
  • yes, i have add field in customer group table @NehaRaval – Navin Bhudiya Mar 7 '17 at 4:26
  • i am using magento 2.1.3 version – Navin Bhudiya Mar 7 '17 at 4:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.