We have a client whose site we have converted to modX, save for a couple forms. I’ll use the simpler example to show what I’m trying to do.
We have an FAQ form where there’s a form to send your own question if your query doesn’t appear on the page. So when they submit the form, we want it to process the form and if everything is complete send an e-mail. We have the snippet of code at the very top of the template, and that works great!
However, we want to display JUST the form if there are any errors or a thank you page after they submit rather than the content. So it should do something like this, but I don’t know how to do it here in modX:
<div class="content-main[[cc_tallest]]">
if (empty($_POST['submit'])) {
[[clinics_confirmation]]
} else {
[*content*]
}
<!-- .content-main -->
</div>
This is probably something very simple, but I don’t know how to do it and I tried a few searches through the forums here before I posted my own message. Does anyone know how to do this?