Jump to content

displayForm et les nouveaux éléments HTML5


Recommended Posts

Bonjour ;

 

Est ce Prestashop 1.5 supporte nativement le HTML5 (les éléments : spinner , video, data-... ) ?

 

En fait; je me suis confronté à un problème avec l'élément HTML5 spinner (input type="number") dans la fonction displayForm; sauf erreur de ma part, l'élément n'est pas pris en compte dans le rendu de la page.

 

public function displayForm()
{
 ...

// Init Fields form array
 $fields_form[0]['form'] = array(
  'legend' => array(
'title' => $this->l('Settings'),
  ),
  'input' => array(
array(
 'label' => $this->l('Number of news to display'),

 'type' => 'number', // 'type' => 'text'

 'name' => 'newsNbr',
 //'size' => 20,

'min' => 1,

'required' => true
)
  ),
  'submit' => array(
'title' => $this->l('Save'),
'class' => 'button'
  )
 );

 $helper = new HelperForm();

...

 // Load current value
 $helper->fields_value['newsNbr'] = Configuration::get('BLOCK_NEWS_NBR');

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

 

Je préfère passer par les méthodes de Prestashop pour la création d'un form que de créer un tpl à part puis faire l'appel.

 

merci pour votre réactivité.

Edited by bxblue (see edit history)
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...