Jump to content

How to display image below the add file field


pippo67

Recommended Posts

Hi everyone,
I need your help. How should I display the image below the Add files field in the configuration page without using {extends file = "helpers/form/form.tpl"} in the myform.tpl file?

public function renderForm()
{    
   $fields_form = array(

                       'form' => array(
                             
 'legend' => array(
                             'title' => $this->l('Settings')'
                             
 'icon' => 'icon-cogs'
                     ),
                    'input' => array(
                                        array(

                                                'type' => 'file',
                                                'label' => $this->l('image')
                                                'name' => 'MYBANNER_IMG',
                                    ),

                  )                                                                                   

        $helpers = new HelperForm(); 
.................................
           
 $helper->tpl_vars = array(
                              
 'uri' => $this->getPathUri(),
.........................................................

This is the myform.tpl file found in views/templates/admin/myform.tpl.

<div class="form-group"> 
   <div id="{$input.name}-images-thumbnails" class="col-lg-12">
       <img src="{$uri}img/{$fields_value[$input.name]}" class="img-thumbnail"/>
    </div> 
</div> 
Thanks in advance     

Link to comment
Share on other sites

  • 2 years later...

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