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

199
Views
Modal only displays once, not after second click

I'm using Bootstrap modal to check if an element is available in a form. If no, it pops the modal. But after I closed the modal, and clicks the Submit button the second time, it won't pop again.

if (!document.getElementById("ipfs-cid")) {
    $("#noFileModal").modal("show");
} else {
    var data = {
      action: "acadp_public_save_metadata",
      ipfs_cid: document.getElementById("ipfs-cid").value,
      filenames: filenames,
      name: document.getElementById("acadp-title").value,
      description: document.getElementById("description").value,
      security: acadp.ajax_nonce,
    };
....

Here's my modal, some near to

<div class="modal fade" id="noFileModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"><?php esc_html_e( 'No File Uploaded', 'advanced-classifieds-and-directory-pro' ); ?></h5>
      </div>
      <div class="modal-body">
        <?php esc_html_e( 'Please upload at least one file.', 'advanced-classifieds-and-directory-pro' ); ?>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>

Any help for a newbie like me is highly appreciated.

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!