<?php
echo CHtml::beginForm(
array('ciao/mondo', 'ciao' => 'asdf', 'aaswdf', 'aw'),
'get',
array('id' => 'asd')
);
?>
<?php echo CHtml::textField('nome'); ?>
<?php echo CHtml::endForm(); ?>
Sapete spiegarmi perchè questo codice genera
<form id="asd" action="/blog/index.php?r=ciao/mondo&ciao=asdf&0=aaswdf&1=aw" method="get"> <div style="display:none"> <input type="hidden" value="ciao/mondo" name="r" /> <input type="hidden" value="asdf" name="ciao" /> <input type="hidden" value="aaswdf" name="0" /> <input type="hidden" value="aw" name="1" /> </div> <input type="text" value="" name="nome" id="nome" /> </form>
mentre questo (cambio solo il metodo da GET a POST):
<?php
echo CHtml::beginForm(
array('ciao/mondo', 'ciao' => 'asdf', 'aaswdf', 'aw'),
'post',
array('id' => 'asd')
);
?>
<?php echo CHtml::textField('nome'); ?>
<?php echo CHtml::endForm(); ?>
genera queest'altro codice?
<form id="asd" action="/blog/index.php?r=ciao/mondo&ciao=asdf&0=aaswdf&1=aw" method="post"> <input type="text" value="" name="nome" id="nome" /> </form>

Help















