php 변수를 모달 창에 전달하고 싶습니다.이 링크를 사용하여 모달 창을 여는 것이지만이 링크에 변수를 전달하고 싶습니다. 모달 창에 같은 변수를 얻을, 나는 일부 사업부에서 텍스트를 추가 할이 일을하려고하지만 내가 쿼리링크를 통해 yiibooster 모달 창에 PHP 변수를 전달하는 방법
echo CHtml::link(
'Set Recipe', '', array(
'class' => 'testclass',
'id' => $finalDate,
'data-toggle' => 'modal',
'data-target' => '#myModal',
'fahadVar' => $finalDate
));
에서 얻을 수 없습니다입니다 HTML을 반환하고 내가이 버튼을 클릭하면 어떻게 모달 창을 가지고 버튼에 변수를 설정하려면 다음을 입력하십시오. 여기에 간단한 모형 코드 yyibooster가 있습니다.
<div class="modal-body">
<p>One fine body...</p>
</div>
<div class="modal-footer">
<?php $this->widget(
'bootstrap.widgets.TbButton',
array(
'type' => 'primary',
'label' => 'Save changes',
'url' => '#',
'htmlOptions' => array('data-dismiss' => 'modal'),
)
); ?>
<?php $this->widget(
'bootstrap.widgets.TbButton',
array(
'label' => 'Close',
'url' => '#',
'htmlOptions' => array('data-dismiss' => 'modal'),
)
); ?>
</div>
<?php $this->endWidget(); ?>
미리 감사드립니다.