Hack Forums
"contact us" form with text preview. - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141)
+---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50)
+---- Thread: "contact us" form with text preview. (/showthread.php?tid=5828395)



"contact us" form with text preview. - grail - Apr 22, 2018

Currently, I have a Contact Us form integrated on my webpage, I am looking to add another box which displays what the message will look like after the "Send" button has been pressed.

Can anyone assist me?


RE: "contact us" form with text preview. - .kr. - Apr 23, 2018

What's you issue?
Show me the Php-Source


RE: "contact us" form with text preview. - Rushax - Apr 24, 2018

We need you to elaborate a bit more on what you're using for the site, is it on a CMS such as WordPress? If so a plugin called Contact Form 7 already handles this for you.
If it's a static site, you may want to look at Bootstraps alert classes that are already preset (if you're using Bootstrap)
https://getbootstrap.com/docs/4.0/components/alerts/

If not, you could just inspect the CSS code from that, initially hide the alert message, use some simple AJAX on-submit and if success, add a class to the alert message.
You may want to add two though, one for success and the other for failed/error.


RE: "contact us" form with text preview. - saint psycho - May 2, 2018

so what you're looking for, is kind of a live preview, of what the email will look like, when it has been sent?