Render helper form from prestashop admin controller

让人想犯罪 __ 提交于 2019-12-04 16:43:50

Well you are calling renderForm() inside renderList(), (I assume you want the form to display by default when you open controller page) but you don't assign the form to template.

public function renderList()
{
    $form = $this->renderForm();

    // To load form inside your template
    $this->context->smarty->assign('form_tpl', $form);
    return $this->context->smarty->fetch(_PS_MODULE_DIR_.'wineoheaderimg/views/templates/hook/adminwineoimg.tpl');

    // To return form html only
    return $form;
}

So if you want the form inside your adminwineoimg.tpl

{* Some HTML *}
{$form_tpl}
{* Some HTML *}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!