CJuiDialog buttons

This line works fine for me in a wiew :rolleyes: .


But I need to use that line in a cJuiDialog button, but can-t get it to work. cJuiDialog use this structure:

'buttons' => array





Well, I’m a newbie here, and i thing I have the grammar wrong cause this doesn’t work


So I’m stuck here, maybe is something simple, but is hidden for me ??? !! Some help please !!


I faced this problem before and had to find a workaround, since i could find a way to trigger an action from the CJuiDialog buttons. Instead of doing what you stated, why don’t you add a button inside the dialog? It is not the most elegant solution, in case you find one pls let me know! :) Hope this is helpful


$this->beginWidget('zii.widgets.jui.CJuiDialog', array(

    'id' => 'window',

    'options' => array(

        'title' => 'My Custom Dialog',

        'autoOpen' => false,




// Here you add the button to the dialog instead of using CJuiDialogs options

<div class="row buttons">

    <?php echo CHtml::ajaxSubmitButton('buttonSubmit'), CHtml::normalizeUrl(array('my_module/my_view', 'render' => false)), array('update' => 'js: function() {..}')); ?>


<?php $this->endWidget('zii.widgets.jui.CJuiDialog'); ?>

Hello Sofia, thanks for the reply

Well, I could not find the solution.

I did the same whit a button inside the dialog, just modified the css to style that button in order to maintain the design.

But I still have this doubt on my mind, If I figure it out i will tell you. ::)