osyris Posted December 11, 2021 Share Posted December 11, 2021 Bonjour, J'ai créé un module pour mon site pour la première fois. Dans la doc de PrestaShop pour la création d'un module, il montre ce script À la fonction public function displayForm() $form = array( 'form' => array( 'legend' => array( 'title' => $this->l('Settings'), ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Configuration value'), 'name' => 'MODULE_TEXT', 'size' => 20, 'required' => true, 'autoload_rte' => true, ) ), 'submit' => array( 'title' => $this->l('Save'), 'name' => 'save' ) ), ); Comme j'enregistre des balises HTML dans ce formulaire, j'ai remplacé 'type' => 'text', par 'type' => 'textarea', et ajouté 'autoload_rte' => true À la place de 'size' => 20, faut t'il remplacer par ? 'cols' => 40, 'rows' => 10, Dois-je ajouter 'lang' => true et 'class' => 'rte', ? J'ai trouvé ceci dans le module ps_customtext.php Link to comment Share on other sites More sharing options...
Knowband Plugins Posted December 13, 2021 Share Posted December 13, 2021 We want to tell you that you can replace size with cols and rows respectively. Also, for creating multilingual fields with a tiny mice editor, you need to use autoload_rte and lang. Image for your reference: https://nimbusweb.me/nimbus-screenshots/0abadca48aef733333d73a794e8ec6b7 https://devdocs.prestashop.com/1.7/development/components/helpers/helperform/ Link to comment Share on other sites More sharing options...
Mediacom87 Posted December 13, 2021 Share Posted December 13, 2021 Link to comment Share on other sites More sharing options...
osyris Posted December 14, 2021 Author Share Posted December 14, 2021 On 12/13/2021 at 12:05 PM, Knowband Plugins said: We want to tell you that you can replace size with cols and rows respectively. Also, for creating multilingual fields with a tiny mice editor, you need to use autoload_rte and lang. Image for your reference: https://nimbusweb.me/nimbus-screenshots/0abadca48aef733333d73a794e8ec6b7 https://devdocs.prestashop.com/1.7/development/components/helpers/helperform/ Merci de m'avoir répondu. Je ne comprends pas pourquoi lorsque j'ajoute 'lang' => true, le champ pour écrire disparait dans le formulaire ? Link to comment Share on other sites More sharing options...
Mediacom87 Posted December 14, 2021 Share Posted December 14, 2021 il y a 6 minutes, osyris a dit : Merci de m'avoir répondu. Je ne comprends pas pourquoi lorsque j'ajoute 'lang' => true, le champ pour écrire disparait dans le formulaire ? Version Prestashop ? Link to comment Share on other sites More sharing options...
osyris Posted December 14, 2021 Author Share Posted December 14, 2021 Bonsoir Mediacom87, Version PrestaShop 1.7.8.2 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