Thursday, January 24, 2013

Creating Data Picker Using Yii Framework [Part 2]

Read the first Part  :: Contain the database and basic creating / generating models / crud


CJUIDIALOG

In these part 2 I will concentrate on CJuiDialog on how to create pop up button. If you need explanation bit further go to this http://www.yiiframework.com/doc/api/1.1/CJuiDialog/.

Now lets start coding. I will creating button that will open dialog.

Open protected\views\post\_form.php and add this code, if you now javascript it will help.

<input type="button" value="Get List User" name="get_user_btn" onclick="$('#mydialog').dialog('open'); return false;" > 

So you will get
<div class="row">
        <?php echo $form->labelEx($model,'id_user'); ?>
        <?php echo $form->textField($model,'id_user'); ?>
        <input type="button" value="Get List User" name="get_user_btn" onclick="$('#mydialog').dialog('open'); return false;" >
        <?php echo $form->error($model,'id_user'); ?>
    </div>

This image should help

[Creating Button]

Starting to Learn Wordpress

 I'm gonna start learning wordpress again. I know it's been a while and I'm using Blogger to write everything.  I don't know...