the form array?

when i submit a form i get just the names of the form elements.

eg.

    <form action="backend.php" method="POST">


        <input type="text" name="password" value="password" />


        <input type="submit" name="loginform" value="submit" />


    </form>

here i will get $_POST[‘password’] and $_POST[‘loginform’] in the backend.php.

so what do they mean with the $_POST[LoginForm’] in the documentation:

foreach($_POST[‘LoginForm’] as $name=>$value)

{

if($name is a safe attribute)


    $model->$name=$value;

}

it seems to be an array, but i dont get where its coming from in the html form.

because the documentation is use for "CHtml::activeXyz()" to build fields~

weird. it wasnt explained in the documentation. how could people possible know?

so the loginForm is the model name i use in the form helper i guess:

activeName(‘loginForm’, ‘myName’);

but how could i know that the attribute ‘myName’ correponds to name=‘myName’ in pure html code?

and if i DONT use their CHtml helper class. then i can’t use massive assignment?

Right, that’s the trick: It wraps all fields of your form model in an array. And it is documented: ;)

http://www.yiiframework.com/doc/guide/form.view