Premitium Posted November 14, 2016 Share Posted November 14, 2016 Hey I want to add a save and stay button to a helper form class. These are my fields so far and it loads great. However, I want to add an ajax save and stay button. How do I do that? public function renderForm() { $fields_form = array( 'form' => array( 'legend' => array( 'title' => $this->module->l('Wineo Header Img Configuration'), 'icon' => 'icon-envelope', ), 'input' => array( array( 'type' => 'file', 'label' => $this->module->l('Add images'), 'name' => 'enable_grades', 'id' => 'uploadwineoheaderimg', 'required' => false, 'desc' => $this->module->l('Choose images that will appear on the front page.'), ), array( 'type' => 'select', 'label' => $this->l('Languages:'), 'name' => 'category', 'required' => true, 'options' => array( 'query' => $options = array( array( 'id_option' => 1, // The value of the 'value' attribute of the <option> tag. 'name' => 'EN', // The value of the text content of the <option> tag. ), array( 'id_option' => 2, 'name' => 'BG', ), ), 'id' => 'id_option', 'name' => 'name', ), ), ), 'submit' => array('title' => $this->module->l('Save')), ), ); Link to comment Share on other sites More sharing options...
Premitium Posted November 14, 2016 Author Share Posted November 14, 2016 This is what I found as a solutions: 'buttons' => array( 'save-and-stay' => array( 'title' => $this->l('Save and Stay'), 'name' => 'submitAdd'.$this->table.'AndStay', 'type' => 'submit', 'class' => 'btn btn-default pull-right', 'icon' => 'process-icon-save', ), ), Link to comment Share on other sites More sharing options...
luksl Posted April 27, 2018 Share Posted April 27, 2018 Thank you for sharing the solution, it hleped me. 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