Viktor-Vladimirov Posted April 19, 2021 Share Posted April 19, 2021 HI i want to render active checkbox by default via controller in bulk_actions. How can this be solved? Is it possible to do using tools symfony ? public function renderView() { $this->table = 'feature'; // SQL table name, will be prefixed with _DB_PREFIX_ $this->identifier = 'id_feature'; // SQL column to be used as primary key $this->className = 'Feature'; // PHP class name $this->lang = true; $this->allow_export = true; // allow export in CSV, XLS.. $this->_defaultOrderBy = 'id_feature'; // the table alias is always `a` $this->_defaultOrderWay = 'ASC'; $featuregoup = Tools::getValue('id'); // id_featuregroup [enter image description here][1] $this->fields_list = [ 'id_feature' => array( 'title' => $this->trans('ID', array(), 'Admin.Global'), 'align' => 'center', 'class' => 'fixed-width-xs', ), "$featuregoup" => array( 'title' => $this->trans('ID Groups', array(), 'Admin.Global'), 'align' => 'center', 'class' => 'fixed-width-xs', ), 'name' => [ 'title' => $this->trans('Name', [], 'Admin.Global'), 'width' => 'auto', 'filter_key' => 'b!name', ], ]; $this->bulk_actions = array( 'hash' => array( 'text' => 'Save', 'icon' => 'done_all', 'confirm' => $this->trans('Save', array(), 'Admin.Notifications.Info'), ), ); return parent::renderList(); } Link to comment Share on other sites More sharing options...
lototo Posted June 11, 2021 Share Posted June 11, 2021 Didnt you forgot to set a type 'type' => 'switch', 'is_bool' => true, 'desc' => $this->l('Switch'), Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now