Chill_user Posted May 29, 2020 Share Posted May 29, 2020 (edited) Hello to all, PS is providing some form constructor for the forms creation in BO. Here is one example: array( 'col' => 3, 'type' => 'text', 'prefix' => '<i class="icon icon-envelope"></i>', 'desc' => $this->l('Enter a valid email address'), 'name' => 'BL_BLOG_ACCOUNT_EMAIL', 'label' => $this->l('Email'), ), This is type text, but I need the form field named "TinyMCE text editor", here is example (photo) How to add this in my form fields? Thanks a lot Edited May 29, 2020 by Amantha Bill (see edit history) Link to comment Share on other sites More sharing options...
JBW Posted June 2, 2020 Share Posted June 2, 2020 Check some other module e.g. ps_customtext how they do it: $fields_form = array( 'tinymce' => true, 'legend' => array( 'title' => $this->trans('CMS block', array(), 'Modules.Customtext.Admin'), ), 'input' => array( 'id_info' => array( 'type' => 'hidden', 'name' => 'id_info' ), 'content' => array( 'type' => 'textarea', 'label' => $this->trans('Text block', array(), 'Modules.Customtext.Admin'), 'lang' => true, 'name' => 'text', 'cols' => 40, 'rows' => 10, 'class' => 'rte', 'autoload_rte' => true, ), ), 'submit' => array( 'title' => $this->trans('Save', array(), 'Admin.Actions'), ), 'buttons' => array( array( 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'), 'title' => $this->trans('Back to list', array(), 'Admin.Actions'), 'icon' => 'process-icon-back' ) ) ); 1 Link to comment Share on other sites More sharing options...
Chill_user Posted June 5, 2020 Author Share Posted June 5, 2020 On 6/2/2020 at 1:24 PM, JBW said: Check some other module e.g. ps_customtext how they do it: $fields_form = array( 'tinymce' => true, 'legend' => array( 'title' => $this->trans('CMS block', array(), 'Modules.Customtext.Admin'), ), 'input' => array( 'id_info' => array( 'type' => 'hidden', 'name' => 'id_info' ), 'content' => array( 'type' => 'textarea', 'label' => $this->trans('Text block', array(), 'Modules.Customtext.Admin'), 'lang' => true, 'name' => 'text', 'cols' => 40, 'rows' => 10, 'class' => 'rte', 'autoload_rte' => true, ), ), 'submit' => array( 'title' => $this->trans('Save', array(), 'Admin.Actions'), ), 'buttons' => array( array( 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'), 'title' => $this->trans('Back to list', array(), 'Admin.Actions'), 'icon' => 'process-icon-back' ) ) ); Thanks a lot, it's working? But how can I modify this field after? Link to comment Share on other sites More sharing options...
JBW Posted June 5, 2020 Share Posted June 5, 2020 2 hours ago, Amantha Bill said: But how can I modify this field after? What exactely do you want to modify? Did you check the module as suggested? Link to comment Share on other sites More sharing options...
Chill_user Posted June 8, 2020 Author Share Posted June 8, 2020 On 6/5/2020 at 2:30 PM, JBW said: What exactely do you want to modify? Did you check the module as suggested? Yes, I did the form with autoload_rte. All is working good. But now, I created a controller to modify some contend and I don't know how to call the form builder for some modifications 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