Majestic
(M Haizmann)
1
Hey guys,
this question may be stupid, but I just can’t figure out how to make it work.
I’m sending an extra variable via the CHtml::submitButton like this:
echo CHtml::submitButton('Create', array('entry_id' => $entry->entry_id));
How can I receive the value in the controller of "entry_id"?
Thanks in advance,
Mayjestic
andy_s
(Arekandrei)
2
It’s not an extra variable, but an html option. You should do smth like this:
echo CHtml::activeHiddenField($entry, 'entry_id');
Majestic
(M Haizmann)
3
Thanks a lot andy, solved it before with
<input type="hidden" name="entry_id" value="<?php echo $entry->entry_id;?>" />
but now i’ve choosen the “Yii-way”