montagy
(Jencean)
December 19, 2013, 3:41am
1
i have search this problem for two hours,there is no same problem or i ask a wrong question
<?php echo $form->textFieldRow($model, 'textField', array(
'class'=>'input-medium',
'prepend'=>'<i class="icon-search"></i>')); ?>
the prepend doesn’t work on my code
<div class="controls-inline">
<input class="input-medium" prepend="<i class="icon-search"></i>"...
I would be most grateful if you could give me some help.
JFReyes
(Jose Reyes)
December 19, 2013, 12:55pm
2
Try removing ‘class’=>‘input-medium’ because textFieldRow already assigns a class to the control and yours might be interfering with it.
montagy
(Jencean)
December 19, 2013, 1:39pm
3
thanks for your help ,but it doesnt work.i’m a newbie and very confuse with this css and js,i just want to use this.The same idea as you,I think the problem is the textFieldRow.But i don’t know the class control-inline is coming and why the prepend doesn’t work.A big headache.Thank you again.
JFReyes
(Jose Reyes)
December 19, 2013, 2:31pm
4
Is your Yii-Bootstrap extension correctly configured? On one of my apps that uses Bootstrap the HTML generated for a prepended textFieldRow just like yours looks like this:
<div class="input-prepend">
<span class="add-on">
<i class="icon-search"></i>
</span>
<input id="Referral_id" class="input-medium" type="text" name="Referral[id]">
</div>
What you posted doesn’t look like this at all.
montagy
(Jencean)
December 19, 2013, 3:04pm
5
JFReyes:
Is your Yii-Bootstrap extension correctly configured? On one of my apps that uses Bootstrap the HTML generated for a prepended textFieldRow just like yours looks like this:
<div class="input-prepend">
<span class="add-on">
<i class="icon-search"></i>
</span>
<input id="Referral_id" class="input-medium" type="text" name="Referral[id]">
</div>
What you posted doesn’t look like this at all.
actually,i just make a test of search form ,just a search form contain the <contain>
i git clone it from github.i have get another way to get my work,
just delete the textFieldRow and write a input by my self it works good.
I know a little about css and js yet ,just want to use.thanks for your reply.