If I am embedding a form in my membership site is there a way to draw the user name and info from the sit

  • docutility
    Asked on January 4, 2018 at 2:08 PM

    If I am embedding a form in my membership site is there a way to draw the user name and info from the site, these strings are used in the pages:

    {%first_name%} = First Name of logged in member
    {%last_name%} = Last Name of logged in member
    {%email%} = Email/Username of logged in member

  • David JotForm Support
    Replied on January 4, 2018 at 4:25 PM

    This could be done using something similar to what is described in the following thread:

    https://www.jotform.com/answers/357275-Is-it-possible-to-automatically-grab-Wordpress-user-details-and-add-them-to-form

    Though instead of using the Wordpress variables you would be using the ones from your membership site.



  • docutility
    Replied on January 4, 2018 at 6:09 PM

    Okay, the thread suggests:

    ?username=<?php global $current_user; get_currentuserinfo(); echo $current_user->user_login;?>

    "?username" is the unique name, either {purchaser's Name} or the field id #first_19, #last_19

    My site uses {%first_name%} = First Name of logged in member and {%last_name%} = Last Name of logged in member.

    In this string what variables are wordpress?

    <?php global $current_user; get_currentuserinfo(); echo $current_user->user_login;?>

  • John_Benson
    Replied on January 4, 2018 at 8:34 PM

    The $current_user is a global variable while the get_currentuserinfo() is a function.

    I hope this information helps. If you need further help, please let us know.

  • docutility
    Replied on January 4, 2018 at 9:08 PM

    You're talking about Word Press, right? I'm not on WordPress. 

    Yeah I think what I need to do is pull the {%first_name%} {%last_name%} from the site where the form is embedded's SQL

    The URL has no user data.

    I need something like:

    $dbo->getobject($sql)

    I don't know...

  • Nik_C
    Replied on January 5, 2018 at 2:23 AM

    I understand you would like to pull some information from the database since you said: "$dbo->getobject($sql)".

    What is the website and form you're working on so we can try to get a better picture of the workflow?