use JustForWeb\QuoteForm; // $contactForm = new ContactForm(); $contactForm = new QuoteForm(); ?> <section class="contact-us" id="contact"> <div class="container"> <!-- SECTION HEADER --> <div class="section-header"> <h2 class="white-text">Request a Quote</h2> </div> <?php use JustForWeb\ContactForm; $contactForm = new ContactForm(); try { if ($contactForm->processForm()) { print "\n <div class=\"alert alert-success\" role=\"alert\">\n Message succesfully sent.\n </div>\n "; } } catch (\Exception $error) { printf("\n <div class=\"alert alert-danger\" role=\"alert\">\n <span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Error:</span>\n %s\n </div>", $error->getMessage()); } ?> <!-- / END SECTION HEADER --> <form role="form" method="POST" action="/quoteHandler.php" onSubmit="this.scrollPosition.value=(document.body.scrollTop || document.documentElement.scrollTop)" class="contact-form"> <input type="hidden" name="scrollPosition">
<?php use JustForWeb\ContactForm; // WordPress view bootstrapper define('WP_USE_THEMES', false); require __DIR__ . '/wp/wp-blog-header.php'; $contactForm = new ContactForm(); try { $contactForm->processForm(); } catch (\Exception $error) { header('Location: ' . $_SERVER['HTTP_REFERER']); } header('Location: ' . "/contact-thank-you");
<?php use JustForWeb\ContactForm; $contactForm = new ContactForm(); try { if ($contactForm->processForm()) { print "\n <div class=\"alert alert-success\" role=\"alert\">\n Message succesfully sent.\n </div>\n "; } } catch (\Exception $error) { printf("\n <div class=\"alert alert-danger\" role=\"alert\">\n <span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Error:</span>\n %s\n </div>", $error->getMessage()); } ?> <section class="ocr__contact"> <form role="form" method="POST" action="/contactHandler.php" onSubmit="this.scrollPosition.value=(document.body.scrollTop || document.documentElement.scrollTop)" class="contact-form"> <input type="hidden" name="scrollPosition"> <div class="col-sm-12 zerif-rtl-contact-name text-left" data-scrollreveal="enter left after 0s over 1s"> <label for="inputName">Name</label> <input type="text" class="form-control" id="inputName" name="name" placeholder="Your Name" required="required" value="<?php echo $contactForm->getField("name"); ?> " /> </div> <div class="col-sm-12 zerif-rtl-contact-name text-left" data-scrollreveal="enter left after 0s over 1s"> <label for="inputEmail">Email</label> <input type="text" class="form-control" name="email" id="inputEmail" placeholder="Email" required="required" value="<?php