0
Can anyone tell me what I call the Bootstrap classes within a form I generated using Codeigniter? From what I’ve researched it uses an associative array, but I’m not getting it. For example, in the label I want to put class='sr-only' and in the input class="form-control input-lg".
echo form_open('crud/create');
echo validation_errors('<p>','</p>');
echo form_label('Nome Completo');
echo form_input(array('name'=>'nome'), '','autofocus');
echo form_label('Email');
echo form_input(array('name'=>'email'));
echo form_label('Login');
echo form_input(array('name'=>'login'));
echo form_label('Senha');
echo form_input(array('name'=>'senha'));
echo form_label('Repita a senha');
echo form_input(array('name'=>'senha2'));
echo form_submit(array('name'=>'cadastrar');
echo form_close();
Tried to put inside array? echo form_input(array('name'=>'email', 'class' => 'nomedaclass'));
– Sr. André Baill
No input gives, but I’m getting a little complicated is on the label.
– Fernanda Ferreira
I solved it. I was able to use the associative array on the label.
– Fernanda Ferreira