Since I don't want to (can't) use model in generation of a form (explained here) and therefore since I can't take advantages of using CForm, CActiveForm or Form Builder, I wrote a simple (test version yet) form with using CHtml:
echo(CHtml::beginForm()); echo(CHtml::label('Name', 'name')); echo(CHtml::textField('name', 'test')); echo(CHtml::submitButton('Send!')); echo(CHtml::endForm());
How to process such forms?
I tried to use old-school, not-object-oriented, not yii-aware approach of looking what is inside $_POST array:
echo('name='.$_POST['name'].'<br /><br />');
But this failed with PHP error saying: "Undefined index: name".
What am I missing?
Both documentation (guide / cookbook) and forum post seems to be very focused on building forms with using models and I can't find anything that would easily explain how to build and process forms generated with pure CHtml approach, like in above example.