Jump to content

"SOLVED" Template call with a form


Recommended Posts

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()]);
}

 

  • Like 1
Link to comment
Share on other sites

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

  • Othmen215 changed the title to "SOLVED" Template call with a form

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...