Save And Continue

Hi, i’ve got a project where users are able to apply for travelling, and they need to feel up some forms(which can be very long); i would like to allow the users to save and continue later. Does anyone knows how i can do it??

Thanks

"Draft" flag + validation scenarios.

Sorry i’m a newbie, can you please be more explicit? Thanks

You add some boolean flag to the db table, showing that record is draft.

During editing process you use validation scenarios to ensure the form is filled up right.

For example: when user wants to publish his final version of form, you turn on ‘publish’ validation rule that checks that all the required fields are filled.

Thanks a lot!! i will try that and see how it works!! :)

You can also do without scenario:


if ($model->validate())

{

  $model->draft=0;

  $model->save();

}

else

{

  $model->save(false);

}

In such ways, if you fail validation save anyway the data (with the draft flag).

This works only if the user submit the form.