Hi Jonas, To get your form-parameters, there are 2 ways:
1) Within your model-class you can access the request via the MgnlContext object. You can then read the parameters in the normal way ( request.getParameter() ). 2) Create Bean-style setter methods in your model class. For example, if your Form-Field is called "first_name", write a setter method called "setFirst_name()". When magnolia finds a name-correspondence between your model's setter methods and a request parameter, magnolia will automatically call the setter method with the parameter value. This happens after your model-class constructor is called, but before the execute() method is called on your model. So one way to handle a form might be to write a setter and getter for each form field, and then to validate the values in your model's execute() method. Regards from Vienna, Richard -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Jonas Mende (via Magnolia Forums) Gesendet: Montag, 04. Februar 2013 09:31 An: Magnolia User List Betreff: [magnolia-user] Re: Use Magnolia Mail Module in Custom Form At first, thanks for the fast and detailed replies. I configured a template and implemented a model class. But how do I access Form parameters within a model class in order to validate and process them? Thanks again, Jonas -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=257affa1-6b48-4453-ab67-55e92ce8f27e ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ---------------------------------------------------------------- ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
