Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
Modal Pop up on Form

I have made a modal pop up which is working great when a button is clicked, but what I really want is for the modal to pop up when the form button is submitted and all my validation checks are passed using PHPMailer.

The modal on the page looks like this:

<button onclick="document.getElementById('modalPopUp').style.display='block'" title="Test Modal">Modal test button &hellip;</button>

<?php require $_SERVER['DOCUMENT_ROOT'].'/Library/Includes/modalWebFormThanks.php';?>

I realise that this is a button onclick event as it is published here, but I have been unable to get my PHP form submission to just load this modal when the form passes all validation in the PHP validation code and gives the 'thank you' message. This part works great except from this segment.

I have tried moving the code out of button, into div and changing the onclick to onload, but none of this works. The modal just doesn't appear.

How do I make this same modal just appear from the PHP 'thank you' message?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!