Hi again,
I have the following code:
<?php
$id = $data->id;
$this->widget('zii.widgets.jui.CJuiButton', array('buttonType'=>'button',
'name'=>'btnContact'.$id,
'caption'=>'Contact Poster',
'htmlOptions'=>array('onclick'=>'$("#postercontactwidget'.$id.'").dialog("open"); return false;')));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id'=>'postercontactwidget'.$id,
'options'=>array(
'title'=>'Contact Poster',
'autoOpen'=>false,
'modal'=>true,
'width'=>480,
'height'=>315,
),
));
$this->widget('PosterContactWidget');
$this->endWidget('zii.widgets.jui.CJuiDialog');
?>
Which works with this form:
<?php echo CHtml::beginForm(Yii::app()->homeUrl); ?>
<?php echo CHtml::hiddenField('posterid',$data->id); ?>
<?php echo CHtml::label('Your Email:','emailtxt'); ?>
<br/>
<?php echo CHtml::textField('emailtxt', '', array('id'=>'contactemail')); ?>
<br/>
<br/>
<?php echo CHtml::label('Your Comment:','commenttxt'); ?>
<br/>
<?php echo CHtml::textArea('commenttxt', '', array('id'=>'contactcomment','cols'=>'45','rows'=>'5')); ?>
<br/>
<br/>
<?php echo CHtml::button('Submit', array('submit' => array('Post/contactposter'))); ?>
<?php echo CHtml::endForm(); ?>
How can I parse a variable value to the CJuiDialog popup so that I can submit it with the form? all the fields on the CJuiDialog popup gets submitted and works 100%, but I need to send an extra variable from the page calling the CJuiDialog popup.
Thanks