Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hello,
I'm not having much luck in trying to figure this out. We're on EPiServer 7.5 and I am posting a form from a Block by using code similar to that found here http://cjsharp.com/blog/2013/04/11/creating-a-xform-block-in-episerver-7-mvc-with-working-validation-updated/. This all works okay but in my XFormPost method I want to check if the ModelState is valid before I do anything else.
e.g.
Snippet
At this point the ModelState is always true. If I run _xformHandler.HandleAction(this) it seems to set the ModelState correctly but I don't really know what else this does. For example I don't want it to post the form data. Can anyone clarify what the HandleAction method does and if there is another (more correct way) of validating the model at this point?
Thanks in advance!