Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda