Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Model->Save vs Form->Save

edited November 2009 in Vanilla 2.0 - 2.8
I'm not clear on when one would want to use one vs the other. In the quick start guide, the model is presented first, but then a form object is used to save user edits back. But in Vanilla, the Discussion function of PostController uses Model->Save.

Pros/Cons of the different approaches?

Comments

  • Options
    MarkMark Vanilla Staff
    The form class will handle taking all of the form inputs and passing them into the model, then it tells the model to validate and save.

    If you just use the model to save, you have to tell it which fields you want to save and get those values from the web page somehow. Basically, the form class does all of that work for you.
Sign In or Register to comment.