Guest Posted April 2, 2020 Share Posted April 2, 2020 (edited) Hello. I need to load and save all features from the database into the form. I added the is_export column to ps_feature. 0 or 1 will be written to this column. So how do I put all items in the form? Thank you $feat = Feature::getFeatures(Configuration::get('PS_LANG_DEFAULT')); $fields_form[1] = array( 'form' => array( 'legend' => array( 'title' => $this->l('Enabled Features), 'icon' => 'icon-cogs' ), 'input' => array( array( 'type' => 'switch', 'label' => $feat['name'], 'name' => $feat['id_feature'], 'required' => true, 'class' => 't', 'is_bool' => true, 'values' => array( array( 'id' => 'active_on', 'value'=> 1, 'label'=> $this->l('Enable'), ), array( 'id' => 'active_off', 'value'=> 0, 'label'=> $this->l('Disable'), ), ), ), ), 'submit' => array( 'title' => $this->l('Save settings'), 'class' => 'button btn btn-default pull-right', ) ), ); Edited April 2, 2020 by Guest (see edit history) 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