Jump to content

How to use HelperForm from a FrontController Module in PrestaShop 1.6


Recommended Posts

I was trying to do a form with the helperForm, but it was imposible. I was following the official documentation, but was imposible for me from the FrontControler.


http://doc.prestashop.com/display/PS16/Using+the+HelperForm+class


Can i do that??


The error that show to me is:



Uncaught --> Smarty: Unable to load template file 'helpers/form/form.tpl'

And my class is:



public function renderForm()
{
$fields_form = array( 'form' => array(
'legend' => array(
'title' => $this->module->l('Edit carrier'),
'image' => '../img/admin/icon_to_display.gif'
),
'input' => array(
array(
'type' => 'text',
'name' => 'shipping_method',
),
),
'submit' => array(
'title' => $this->module->l('Save'),
'class' => 'btn btn-default pull-right'
)
));

$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->table = $this->table;
$this->fields_form = array();

$helper->identifier = $this->identifier;
$helper->submit_action = 'submitBlockCart';

return $helper->generateForm(array($fields_form));
}

I'm going crazy....


Link to comment
Share on other sites

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...