Support » Plugin: Woody ad snippets - Insert Header Footer Code, AdSense Ads » Doesn’t work when appended to a form url

  • Resolved LucasHilty

    (@lucashilty)


    I am using this currently to return the email address of logged-in users in a form field:
    <iframe id=”JotFormIFrame-70254644192152″ onload=”window.parent.scrollTo(0,0)” allowtransparency=”true” src=”https://form.jotform.com/70254644192152?email=[insert_php] global $current_user; get_currentuserinfo(); echo $current_user->user_email;[/insert_php]” frameborder=”0″ style=”width:100%; height:909px; border:none;” scrolling=”no”> </iframe>

    I tried replacing this with a snippet (the new way):
    <iframe id=”JotFormIFrame-70254644192152″ onload=”window.parent.scrollTo(0,0)” allowtransparency=”true” src=”https://form.jotform.com/70254644192152?email=[wbcr_php_snippet id=”48958″]” frameborder=”0″ style=”width:100%; height:909px; border:none;” scrolling=”no”> </iframe>

    This results in the email field being populated with [wbcr_php_snippet id=

    The snippet contains this code: global $current_user; get_currentuserinfo(); echo $current_user->user_email;

    Any suggestions?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author webcraftic

    (@webcraftic)

    Hi,
    Enter the code for your iframe insert inside the snippet, and call it with a shortcode.

    global $current_user; 
    get_currentuserinfo(); 
    
    echo '<iframe id="JotFormIFrame-70254644192152" style="width: 100%;" src="https://form.jotform.com/70254644192152?email='.$current_user->user_email.'" frameborder="0" scrolling="no"><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></iframe>';

    Step 1

    Step 2

    Best regards, Alex

    • This reply was modified 1 year, 2 months ago by  webcraftic.

    Thanks so much! I will try that.

    When I do this, most of the iframe is hidden by the footer. https://prnt.sc/jx5zsf

    This is a CSS issue I’m sure, not anything to do with the PHP code plugin. I don’t know CSS. I just thought I would let you know.

    Plugin Author webcraftic

    (@webcraftic)

    Hi,
    Sorry, I missed the height in my code. Check, this should work.

    global $current_user; 
    get_currentuserinfo(); 
    
    echo '<iframe id="JotFormIFrame-70254644192152" style="width: 100%; height:909px;" src="https://form.jotform.com/70254644192152?email='.$current_user->user_email.'" frameborder="0" scrolling="no"><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></iframe>';

    Best regards, Alex

    Lovely!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Doesn’t work when appended to a form url’ is closed to new replies.