Cakephp 3 Formhelper input : how to add a css class attribute -


i'm trying add css class attribute field have small problem :

echo $this->form->input('datelimite', ['type'=>'text', 'foo' => 'bar', 'class' => 'datepicker']); 

output :

<input class="form-control" type="text" name="datelimite" foo="bar" required="required" id="datelimite"> 

the class attribut cannot displayed. have idea please ?

i'm going go out on limb here , guess you're using holt59's bootstrap 3 helpers. there's bug in code overwrites classes set, , replaces classes form-control.

the guy sit next @ work, @matt-stephens, had fix merged repo, if update it, class should appear expected. testing locally:

echo $this->form->input('datelimite', ['type'=>'text', 'foo' => 'bar', 'class' => 'datepicker']);

now gives:

<input type="text" name="datelimite" class="form-control datepicker" foo="bar" class="datepicker" id="datelimite" />

here's merge request.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -