FormIt: show success messages with two forms on the same page

I have two forms on one page, one being a simple newsletter subscribe form and one a simple contact form. I want both forms to show an individual success message after sending on this page, but currently each success message placeholder ([[!+fi.successMessage]]) is showing the message of the submitted form.

I’ve separated the two formit calls by the &submitVar property but that doesn’t count on the success placeholder.

How can I make only one success message show up after successfully submitting one of the forms? Or probably the question is: How can I assign the [[!+fi.successMessage]] to each form?

You can use successMessagePlaceholder to specify the placeholder for the success message. With multiple forms ensure these are unique otherwise the form will just hit the first one it finds that matches the placeholder.


Wow, how did I miss that? :sweat_smile: Thanks alot!

That’s cool! That also means, I think, that you could put one extra generic placeholder above 2 or more forms, and the success message will always be at top of the page for all of them, if they aren’t customized.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.