Support » Plugin: Easy Modal » Same modal, different formatting, CSS problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    What plugin are you using to generate that form? I’m not familiar with the shortcode. If its anything like Gravity Forms it uses has_shortcode to detect which scripts and styles to load. Because of this they don’t get detected and styles not loaded.

    In GF there is a line of code you have to add which is done automatically since I know what it is. Once I do some looking into your form plugin I will try to find a solution.

    Thread Starter Musiphilos

    (@musiphilos)

    Hi Dani. Thank you for your help

    The plugin is Visual Form Builder (VFB).

    I managed to include a conditional load of the VFB CSS file on pages.php that only occurs on the specific pages where I know the form is located.

    This corrects the problem, but not in a very elegant way.

    The plugin does have an option to force the CSS load on whole website, but that is something I’d like to avoid.

    Thank you for your help.

    Plugin Author Daniel Iser

    (@danieliser)

    Great. If you can tell me what you did to conflditionally load the scripts and styles I can add it in automatically for future builds like I have done for gravity forms.

    I am working on v1.3 features now so I will try to add it to the upcoming major release.

    Thread Starter Musiphilos

    (@musiphilos)

    As I mentioned. It is not an elegant solution, but here’s what I did:

    <?php if ( is_page(array('page_slur_with_form','another_page_slur'))) { ?>
    	<link rel="stylesheet" href="<?php echo plugins_url(); ?>/visual-form-builder/css/visual-form-builder.min.css" type="text/css" />;
    <?php } ?>

    Hope it helps.

    I’ll be looking for the upcoming release, and eventually buy your pro version if it gets this VFB inclusion.

    Thank you

    Thread Starter Musiphilos

    (@musiphilos)

    By the way,

    There is also another problem with this form plugin: all the warnings and submission messages cause the page to reload, killing the modal window.
    You can test this behaviour on my previously submitted pages.

    Don’t know if it could be managed, but I think that would be a great addition to your plugin Dani.

    Cheers

    Plugin Author Daniel Iser

    (@danieliser)

    I have added your notes above to my issue tracking. I will try to get it squeezed into v1.3 but there are a lot of changes already scheduled so it may get pushed back as a small update to v1.3 shortly after.

    as far the reloading does the form usually do this? IE does it have an AJAX option? If not it may require an update from the developer to add that.

    If you try contact form 7 or have used GF they both have ability to submit with AJAX.

    Without that ability you could potentially do some url detection in your JS to reshow the modal.

    If when you click submit and the page changes does it add a anchor to the url ie ( #myform ). If so then with a little JS you could detect that and open the modal back.

    if(window.location.hash == 'myform')
    {
      $('#eModal-1').emodal('open');
    }

    Obviously this isn’t the most beautiful solution.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Same modal, different formatting, CSS problem.’ is closed to new replies.