Vanilla open source was terminated 1 January 2025 by Higher Logic. See this announcement for more information.

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

  • 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.