Home / Forums / DynamiX Support / Link button to form

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts

  • MFKing
    Participant

    Hi,

     

    I would like to link a button to a pop-up contact form like this:

     

    <p>[button color=”red” ][iphorm_popup id=2 name=”Booking form”]Book a lesson now![/iphorm_popup][/button]</p>

    but it doesn’t work. Any ideas how I can make this work?

     

    M

    Andy
    Andy
    Keymaster

    Hi,

     

    That wouldn’t work – do you have a link to the page the booking form is on without the button code. Does it normally have another button that triggers the popup?


    MFKing
    Participant

    Hi Andy,

     

    This is the page where the form is triggered from: http://www.fionapagemusic.co.uk/?page_id=486

     

    The trigger is just the code: [iphorm_popup id=2 name=”Booking form”]Book a lesson now![/iphorm_popup]

     

    Ideally I would like to make the buttons have the same functionality. Do you think it’s possible?

     

    Regards,


    Tom ( Support)
    Keymaster

    Hi,

     

    Try adding this iphorm-fancybox-link to the page within your menu admin. You may need to enable CSS Classes.

     

    To do this, go to Appearance, Menus. Click Screen Options at the top right and tick CSS Classes. Choose your page from the menu below and paste the code into the CSS Classes field. Save and test it.

     

    It may not work due to the plugin assigning a id, If that doesn’t work it will need to be custom coded with jQuery. If you are interested in this please contact me for a price.

     

    Thanks,


    MFKing
    Participant

    Hi tomphillips,

     

    Thank you.

    What is it I’m pasting into the CSS Classes (optional) box?

    This: [button color=”red” ][iphorm_popup id=2 name=”Booking form”]Book a lesson now![/iphorm_popup][/button]?

    Best regards,

     

    Andy
    Andy
    Keymaster

    Hi,

     

    Tom means try adding the text iphorm-fancybox-link css classes field. This class acts as a trigger for the popup script, it may work or it may require the ID which is associated with it, try it and see what happens.


    MFKing
    Participant

    Hi Andy,

     

    Thanks for the clarification, however It doesn’t appear to have altered the iphorm link itself on the page.  Do you know if there is any way of making a button or image hyperlink to a jquery pop-up form? Sure it’s possible.

     

    Best regards,

     


    MFKing
    Participant

    I have found this piece of info in reference to the current question:

     

    Adding the form to a theme PHP file

    You will need the unique ID number of your form to do this, you can find this number at the top of the form builder when editing a form or on the list of forms. Once you have it, insert the code below to your WordPress theme PHP file and replace FORM_ID with the unique ID number.

    <?php if (function_exists('iphorm')) echo iphorm(FORM_ID); ?>

    Could you tell me which file I would need to add this to? And then presumably Tom’s advice will work?

    Andy
    Andy
    Keymaster

    Hi,

     

    We can only give a guide because it is custom work, however, you will need this plugin to run PHP in posts/pages.

     

    http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/

     

    Then add the following to Header Settings -> Add Custom HTML.

     

    <div id="my-iphorm" style="display:none;">
    [php] if (function_exists('iphorm')) echo iphorm(FORM_ID); [/php]
    </div>

    Then in the Appearance -> Menus -> Add the #my-iphorm to the menu URL which will activate it, plus add fancybox to the class for that menu item.

     

    If that doesn’t work, unfortunately it would be some custom work.


    MFKing
    Participant

    Hi Andy,

     

    Thanks for the reply.

     

    When I do the step:  Appearance -> Menus -> Add the #my-iphorm to the menu URL

     

    Do I need to just paste verbatim #my-iphorm into the URL box? And then iphorm-fancybox-link in the CSS classes (optional) box?

     

    What should I expect to see differently or do differently once I’ve made this changes?

     

    Regards,

    Andy
    Andy
    Keymaster

    Yes that’s correct – hopefully that should fire up the form.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.