TOPIC:

Load fields from database 6 months 2 weeks ago #238893

  • Topic Author
  • deeplogica
  • Away
  • Junior Breezer
  • Junior Breezer
  • Posts: 28
  • Thanks: 0
HI
I need to load certain fields based on the current user.
I have tried using code I saw on your help section, but it doesnt work - the email is never picked up. (joomla 3.9, breezingforms pro)

I have placed this code in the scripts tab on Advanced Form options.
<?php
echo '
var _name = "'.JFactory::getUser()->get('name').'"
var _email = "'.JFactory::getUser()->get('email').'"
var _username = "'.JFactory::getUser()->get('username').'"
';
?>

function ff_ORGENERGY_init()
{
// ff_getElementByName('name').value = _name;
ff_getElementByName('email').value = _email;
// ff_getElementByName('username').value = _username;
} // ff_YourFormName_init

Not sure what im doing wrong !
Thanks!

Please Log in or Create an account to join the conversation.

Load fields from database 6 months 2 weeks ago #238917

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 413
Hello,

Please take a look at this crosstec.org/en/support/online-documenta...and-classicmode.html piece of documentation.
Here it is explained how to fill in form fields with wanted values.

Just put the codes suggested as the Value of a field in the Properties of the corresponding field.

Regards,

Mihaela

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.033 seconds

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

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!