3

I have designed a site that is mainly modals - so there is only index page and it is all driven by scripting. (Its an artistic site and the client wanted this look and feel).

I am finishing the contact form and want the system message that appears after submission to either go away completely or appear inside the contact modal - but its not its own html page...

Can i supress these system messages? Or how can I get the system message to appear inside my modal popup?

Thanks

1

The easiest answer is to use an iFrame as @madebyhippo explains. Also, take a look at the Custom System Messages addon. This will move your system messages into regular EE templates so you'll have 100% control over the output.

1

I guess I have a different approach. For contact forms I always use Safecracker to store the data as channel entries. This way if an email isn't received, the contacts is readily available in a familiar place. With this method, there is no screen to worry about. You just redirect the user where you want, and you can even submit the form with AJAX if you want. This method always seems like the least amount of work, and uses first-party code to handle everything aside from the emails.

For emails, I use my Postmaster add-on to create custom templates and can send them to whomever I need, and at any specific instance. Postmaster is a commercial add-on, but it's designed to give you the flexibility not available inherently available in EE.

https://objectivehtml.com/articles/read/postmaster-v1.2

2
  • Thanks Justin, I think I will give this a try, have not used safecracker before - when you say for emails - do you mean the way the contact form submission gets sent to the webmaster? Or is this something in addition to notification of contact form submission? Jan 17 '13 at 4:30
  • EE provides very basic notifications for new channel entries. And since Safecracker creates new entries, it just triggers those notifications - which is why I use my add-on Postmaster to make the email templates a lot better. Postmaster is a bit overkill for a single contact form, but it's an extremely versatile add-on for emails notifications of any kind. Jan 17 '13 at 8:27
0

If you're using a modal form which supports iFrames - I suggest that you load your contact form into that and then when you post, target the iFrame and it'll load the system message in there.

Alternatively, Post the form via AJAX using jQuery and completely bypass the system message, allowing you to display your own message/response.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.