templates/home/parts/contact_us.html.twig line 1
<style>.user-box {position: relative;}.user-box input {width: 100%;font-size: 16px;color: #fff !important;margin-bottom: 30px;border: none;border-bottom: 1px solid white !important;outline: none;background: transparent;}.user-box .form-control:focus {color: black !important;}.user-box label {font-size: 16px;color: white;}.user-box-radio {color: white;}textarea {width: 100%;}/* Popup style */.popup {display: none;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);background: rgba(0, 0, 0, 0.8);color: white;padding: 20px;border-radius: 8px;text-align: center;}.popup.show {display: block;}</style><div class="container bg-gradient-dark"><div class="row"><div class="col-12 col-md-4 mx-auto">{{ form_start(form, {'attr': {'class': 'py-5'},'action': path('new_website_contact_from_contact_form')}) }}{{ form_widget(form._token) }}<div class="user-box">{{ form_row(form.firstName) }}</div><div class="user-box">{{ form_row(form.lastName) }}</div><div class="user-box">{{ form_row(form.email) }}</div>{% if CompanyDetailsService.companyDetails.contactFormIncludeTelNumber ==1 %}<div class="user-box">{{ form_label(form.mobile, 'Phone', { 'label_attr': {'class': 'form-label'} }) }}<supstyle="padding-left:5px">*</sup>{{ form_widget(form.mobile, { 'attr': {'class': 'form-control', 'required': 'required'} }) }}</div>{% endif %}{% if ProductService.getProductContactFormCount() > 1 %}<div class="user-box-radio products_requested">{{ form_row(form.productsRequested) }}</div>{% endif %}{% if CompanyDetailsService.companyDetails.contactFormIncludeMessage ==1 %}<div class="user-box">{{ form_label(form.notes, 'Message', { 'label_attr': {'class': 'form-label pr-5'} }) }}{{ form_widget(form.notes, { 'attr': {'class': 'form-control', 'style': 'width: 100%', 'rows': '7'} }) }}</div>{% endif %}<button class="btn btn-outline-success mt-3" type="submit" onclick="showThankYouMessage(event)">Submit</button>{{ form_end(form, { 'render_rest': false }) }}</div></div></div><!-- Popup message --><div id="thankYouPopup" class="popup"><p>Thank you for submitting your details</p>{% if CompanyDetailsService.companyDetails.WebsiteContactsAutoReply == 'Auto' %}<p>Please check your email.</p>{% else %}<p>We will be in contact shortly.</p>{% endif %}</div><script>function showThankYouMessage(event) {event.preventDefault(); // Prevent form from submitting immediately// Show the popupdocument.getElementById('thankYouPopup').classList.add('show');// Simulate form submission after a delaysetTimeout(function () {// Here you can trigger the form submission after showing the popupevent.target.closest('form').submit();}, 2000); // Delay to allow popup to be visible for 2 seconds}</script>