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

  • Profile Image
    docutility
    Asked on January 04, 2018 at 02: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

  • Profile Image
    david
    Answered on January 04, 2018 at 04: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.



  • Profile Image
    docutility
    Answered on January 04, 2018 at 06: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;?>

  • Profile Image
    John_Benson
    Answered on January 04, 2018 at 08: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.

  • Profile Image
    docutility
    Answered on January 04, 2018 at 09: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...

  • Profile Image
    Nik_C
    Answered on January 05, 2018 at 02: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?