markquee
(Markjohn42)
August 15, 2012, 5:47am
1
Hi!..I’m newbie here so pls bear with me…
How to embed the colorpicker 1.6 in form…
I embed it and run but my situation is how to put in here…
<div class="row">
<h4><?php echo $form->labelEx($model,'link_color'); ?></h4>
<div class="space">
<?php echo $form->textField($model,'link_color'); ?>
<?php echo $form->error($model,'link_color'); ?>
</div>
</div>
kiran123
(Sharmakiran71)
August 15, 2012, 6:44am
2
You can see the usage of colorpicker By Click Here
just replace below line in current code,
<?php echo $form->textField($model,'link_color'); ?>
Replce by,
$this->widget('application.extensions.colorpicker.EColorPicker',
array(
'name'=>'ModelName[link_color]',
'mode'=>'textfield',
'fade' => false,
'slide' => false,
'curtain' => true,
)
);
I haven’t use it, but guess something like this…
kiran123
(Sharmakiran71)
August 15, 2012, 7:44am
4
Hey, I had created sample demo and working fine for me.
Had you put and extrect extension zip file in protected\extensions folder?
just put below code (given on extension page) in any view file…
$this->widget('application.extensions.colorpicker.EColorPicker',
array(
'name'=>'cp',
'mode'=>'textfield',
'fade' => false,
'slide' => false,
'curtain' => true,
)
);
markquee:
nope…not working.
markquee
(Markjohn42)
August 17, 2012, 12:07am
5
Yes I’ve run it successfully but I like that the data from field will be the value in the textfield of color picker and update it.
Here’s the situation…
There is a #d3d3d3 color in my db, if i run the color picker the default is 000 it should be #d3d3d3 from my db and if i change the color from the colorpicker extension it should update in my db. How to put the model in the extension?