Yiibootstrap Prepend Doesnt Work

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="&lt;i class=&quot;icon-search&quot;&gt;&lt;/i&gt;"...



I would be most grateful if you could give me some help.

Try removing ‘class’=>‘input-medium’ because textFieldRow already assigns a class to the control and yours might be interfering with it.

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.

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.