This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

pass variables through iframe


  1. johnfox
    Member

    Is there anyway for me to pass variables to a form that resides on a web page iframe? The iframe page is inside a member area, so I already know who's filling out the form. I'd like to be able to pull user information so I can autofill the form.

    pls advise.

    Posted 15 years ago #
  2. redityo

    If your web page type is PHP, you can set the url variable data in machform embed code. For example your web page iframe url source is like this :

    http://www.yourdomain.com/user=nameoftheuser

    and you've embed code like this

    <iframe height="1546" allowTransparency="true" frameborder="0" scrolling="no"
    style="width:100%;border:none"
    src="http://www.yourdomain.com/machform/embed.php?id=26" title="Untitled Form">
    <a href="http://http://www.yourdomain.com/machform/view.php?id=26" title="Untitled Form">Untitled Form</a></iframe>

    then you can call/pass variable data to embed code like this

    <iframe height="1546" allowTransparency="true" frameborder="0" scrolling="no"
    style="width:100%;border:none"
    src="http://www.yourdomain.com/machform/embed.php?id=26&user=<?php echo $_GET['user']; ?>" title="Untitled Form">
    <a href="http://http://www.yourdomain.com/machform/view.php?id=26&user=<?php echo $_GET['user'];"
    title="Untitled Form">Untitled Form</a></iframe>

    and for auto fill the field , you can look at to this post

    http://www.appnitro.com/forums/topic/dynamic-content-php?replies=25#post-937


    MachForm Support

    Posted 15 years ago #

RSS feed for this topic

Reply