1

I have a form, that upon completion, goes back to the page it was called from and displays a message of success when everything is done. Is it possible to just display an image on that same page, or do I have to redirect to a new page to show the form submission success image?

0

There is a way to do this.

One problem here is that the confirmation message is just that, a confirmation which is unrelated to any context.

What you could do is to use jQuery to react to the string of the message is being put out ... so if it's something along the lines of: "Success, your message was sent" - which you "could" assign a string-match on and create a reaction to it. Most likely you would append/prepend a container with a custom confirmation message or image at this point. This would involve a bit of a work-around however (Assign a .js script to handle it - which in Drupal means editing your template.php file).

I usually opt for the confirmation page either way. Users also often don't see the little confirmation message on the same page and a dedicated confirmation page can go a long way in keeping a user on your site - you could for instance use this to display a range of your latest blog entires/products etc. as a block on that page or even have an ad block to collect a few clicks, depending on the kind of site you're working on atm.

| improve this answer | |

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.