WordPress.org

Ready to get started?Download WordPress

Forums

SimpleModal Contact Form (SMCF)
Any way to make popup happen on page load? (5 posts)

  1. tangobango
    Member
    Posted 1 year ago #

    Hi. I like the look of the popup and the options, but can it be made to activate on page load rather than relying on a user click?

    Thanks.

    Ed

    http://wordpress.org/extend/plugins/simplemodal-contact-form-smcf/

  2. tangobango
    Member
    Posted 1 year ago #

    To be more clear, I want it to load only when a certain custom page is loaded. It seems like an "add_action" hook would work if I wanted it on all pages, (Yes?) but I only want it on a specific page.

  3. mckenzie077
    Member
    Posted 1 year ago #

    Hi,

    Did you have any luck on this?

    I'm looking for the same feature if possible?

    Cheers,

    McKenzie

  4. tangobango
    Member
    Posted 1 year ago #

    Yes. It took a few steps.

    1. Create a form using the "Contact 7" plug in. it will give you a code like [contact-form-7 id="857" title="Contact form 1"]

    2. Create a dummy page in WP. In the editor, next to the "Add media" button, there is a small logo that is for the Lightbox. Click it. It will ask you to enter the code you got from above. Delete the "link text" and set whatever options you want.

    3. Click "Insert lightbox form". It will put a code like this on the page in the editor: [formlightbox_call title="lightbox form" class="1361580215070"][/formlightbox_call] [formlightbox_obj id="1361580215070" style="" onload="false"][contact-form-7 id="857" title="Contact form 1"][/formlightbox_obj]. Copy this code

    4. Open the custom page where you want the lightbox to appear in an editor and add a new php tag <?php echo do_shortcode('');?> near the bottom. Paste the code from step 3 between the quote marks, so you have something like <?php echo do_shortcode('[formlightbox_call title="lightbox form" class="1361580215070"][/formlightbox_call] [formlightbox_obj id="1361580215070" style="" onload="false"][contact-form-7 id="857" title="Contact form 1"][/formlightbox_obj]');?>

    5. This will have the form popup only when the custom page is loaded. (You can now delete your dummy page. We only used it to get the code we needed in step 3.)

    I hope this helps.

    Cheers.

    Ed

  5. mckenzie077
    Member
    Posted 1 year ago #

    Hi Ed,

    Thanks for your reply.

    Unfortunately I am not using this for a word press site, so require a jquery solution to the problem.

    I contacted the developer but no response for a week or so.

    Can't seem to get it to work no matter what I do :(

    Thanks anyway

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic