Updating content after form validation

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
cj5

Updating content after form validation

Post 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...
cj5

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

Post 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?
Locked

Return to “CMSMS Core”