Othmen215 Posted April 4, 2023 Share Posted April 4, 2023 I want to call a tpl file in addition to this form but i couldn't call it in the getcontent() any idea ? controller code :https://codebeautify.org/alleditor/y2367c898 Link to comment Share on other sites More sharing options...
endriu107 Posted April 4, 2023 Share Posted April 4, 2023 In renderForm() try something like that: protected function renderForm() { $helper = new HelperForm(); $helper->show_toolbar = false; $helper->table = $this->table; $helper->module = $this; $helper->default_form_language = $this->context->language->id; $file = $this->context->smarty->fetch($this->local_path.'path_to/file.tpl'); return $file . $helper->generateForm([$this->getTokenForm()]); } 1 Link to comment Share on other sites More sharing options...
Othmen215 Posted April 5, 2023 Author Share Posted April 5, 2023 9 hours ago, endriu107 said: In renderForm() try something like that: protected function renderForm() { $helper = new HelperForm(); $helper->show_toolbar = false; $helper->table = $this->table; $helper->module = $this; $helper->default_form_language = $this->context->language->id; $file = $this->context->smarty->fetch($this->local_path.'path_to/file.tpl'); return $file . $helper->generateForm([$this->getTokenForm()]); } It worked for me thanks ! 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