Putting Joomla user info automatic in form.

  • Posts: 2109
  • Karma: 72
  • Thank you received: 267

mihaela replied the topic: Putting Joomla user info automatic in form.

Hello,

If you want to fetch mobile number and country that user enters in Joomla registration form, then please take a look at this topic crosstec.org/en/forums/35-form-help/1248...ile-data.html#229656 since here your question is answered.

For example, to prefill a field with the user's phone number put this as value:
<?php $profile = JUserHelper::getProfile($user->id);return $profile->profile;?>

If you want to fetch value from some other database table then navigate to form's Advanced properties > More options > Form pieces and in Before Form section set Type to Custom.

In the code area below put code similar to this one:
$this->execPieceByName('ff_InitLib'); //Include BreezingForms Library
$db = JFactory::getDBO();//Get Database Object

$db->setQuery("SELECT ... "); 
$result = $db->loadResult();

ff_setValue('fieldname', $result);
You have to put the correct query in setQuery() and replace fieldname with the name of the field that you wish to fill in with value from database.

Let me know whether you have managed to make this work as you wanted.

Regards,

Mihaela
#235529
Moderators: ForumSupporttomeperica
Time to create page: 0.048 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here