The problem is I don’t want to replace the ‘Content’, i actually want to replace the ‘Form’. The Content should still be the same. I should have mentioned that. I already tried $Form.RAW but it doesn’t display the Form anymore.
Oh… So, I’m sure there are more elegant solutions out there, but I generally do something like this… At the end of my SendForm function I redirect back to the same page and append a success param to the URL with this…
Controller::redirect($this->Link('?success=1'));
Then I create a new function to check for that…
public function Success()
{
return isset($_REQUEST['success']) && $_REQUEST['success'] == 1;
}
Lastly, in my template I have some logic that checks that boolean…
<% if Success %>
<p>Success message or content var here</p>
<% else %>
$ContactForm
<% end_if %>