• Hi,
    First I would like to start off by saying that I’m very new to wordpress, coding, css, all that. But I’m trying very hard to learn my way through 🙂
    So my apology if my problem is not descriptive enough.
    Also I’m building this site offline so I’m sorry I can’t provide with the link.

    Here is what I have currently:
    – I used ‘Contact Form 7’ to create a simple subscription form, using ‘MailPoet-Contact Form 7 Integration’ plugin.
    – Then I used ‘Lightbox Plus ColorBox’ to open this form as a lightbox when a text link is clicked.
    – Here’s the code in the header.php to trigger the modal with the text link.
    `<div id=”JOIN”>
    <a class=”lbp-inline-link-1 cboxElement” href=”#”>J O IN</a>
    <div style=”display: none;”>
    <div id=”lbp-inline-href-1″ style=”padding-top:10px; padding-left: 30px; background: #fff; overflow-y: hidden;”>
    <p><?php echo do_shortcode(‘[contact-form-7 id=”596″ title=”JOIN FORM”]’); ?></p>
    </div>
    </div>
    </div>`

    So all this works perfectly as I want it.
    Now, the part I would like to figure out, but couldn’t and pulling my hair out for the last two days:
    – Currently, the lightbox automatically closes when the ‘submit’ button is clicked. And when I click the text link to open the lightbox again, I see the form with the response (if a field is missing or was successful).
    – However, I would like the lightbox to remain open after the submit button is clicked. Therefore the we can see the response right away.
    – The lightbox should only close if x or the overlay is clicked.

    A bonus question:
    – Is it possible to renew the form when the lightbox is closed so that when it opens again, we don’t see the respond of the previous submission?

    I see online that many people have raised this question in the past, but I couldn’t find any solution. Please someone help me or point me to the right direction. Also please consider that I am new to all this, so easy explanation would help me extremely.

    Thank you in advance for your time!
    Jin

    https://wordpress.org/plugins/lightbox-plus/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Prevent lightbox form from closing after submit’ is closed to new replies.