Page 1 of 1

Updating content after form validation

Posted: Wed Mar 28, 2007 4:02 pm
by cj5
Is there a way, after form validation fails to update the content of the page with an already defined global content block. I have a form that validates, and if it fails I want to return to that form with all it's errors and values, by simply updating the content via code and not through the template. Is there a setContent method somewhere in the API? If so how do I access it?

Thanks,
CJ...

Re: Updating content after form validation:: one step closer

Posted: Wed Mar 28, 2007 4:53 pm
by cj5
Ok, so I add this to my UDT "procContact":

Code: Select all

if($mode == "send") {
    $gc = GlobalContentOperations::LoadHtmlBlobByName('contactForm');
    echo $gc->content;
}
And I get the form back, but the Smarty vars won't evaluate, and are rendered into the HTML. How can I assign the form errors to Smarty, and render the HTML with those variables included?