- CharlesAsked on March 04, 2012 at 08:01 AM
I have used jotform for a few years and I am very happy, I have a joomla site with Community builder, my question is it possible to have a form prefill based off user name from joomla to the jotfom that way the user dosent have to put in info twice.
- moonzkieAnswered on March 04, 2012 at 08:48 AM
I'm not sure if this is possible. Nevertheless, the idea is a good one I'm sure it will be forwarded to the developers.
- fantasy1Answered on March 04, 2012 at 09:02 AM
There are plugin's available from Community Builder as a extension to prefill info into a article, but I have tried them and they dont work with jotform, it would be nice it would be nice to prefill information already collected about a user.
- JotForm SupportliyamAnswered on March 04, 2012 at 09:53 AM
Can you try editing a page and checking the result of this code:
<?php var_dump($my); ?>
If you can identify which one of those keys in the array returns the username, then you can try using URL parameters to auto-fill the field for the username.
I'll try to install and see for myself the specific variable returned later.
- fantasy1Answered on March 04, 2012 at 01:31 PM
Not sure how to do that...my site is www.fantasydirtracing.com
- JotForm SupportliyamAnswered on March 05, 2012 at 07:25 AM
This process is a bit tricky as this requires a bit of PHP programming knowledge. To be able to set and use the session username variable in Joomla, you will need to use this code:
$user =& JFactory::getUser();
And this is the variable to call the username:
Your complete code:
$user =& JFactory::getUser();
Now you have the variable $user->username, you can then try doing some URL parameters on your form. But first, we need to find out how you embedded your code in your site. If you added your form as an article, you will need to use text editors such as Jumi or Sourcerer to be able to use PHP in your article.
There are a number of ways how to use PHP code depending on how you inserted your form in your Joomla side. Can you share with us some bit of details? Currently, I could not find as well your form in your website.
We'll wait for your response.
- fantasy1Answered on March 06, 2012 at 07:16 PM
- fantasy1Answered on March 06, 2012 at 07:18 PM
Here is direct page with form on it http://www.fantasydirtracing.com/fantasy-dirt-racing-advertising/adplacement
- edz_kgsAnswered on March 06, 2012 at 10:43 PM
I believe the editing is needed to be done within Joomla page. Do you have a personal developer who helps you on this type of tweaks? If not, let see if Jotform admin supports can help you sort this thing out.
- JotForm SupportliyamAnswered on March 06, 2012 at 10:51 PM
Thank you for the response fantasy1. Let's take this one step at a time :)
Once you're done installing it, we can continue with getting the username variable and have it assigned to one of your form's text fields.
- JotForm SupportNik_CAnswered on October 21, 2016 at 06:31 AM
I opened a separate thread for you to avoid any confusion. You can find it here.
Please tend to open new threads for each question you have so we can attend them more quickly.