Is it possible to pre-propagate username in cb form?

  • Dragonrider
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 43
  • Thank you received: 1

Dragonrider replied the topic: Is it possible to pre-propagate username in cb form?

Thanks, I've just tried to pre-propagate the Contact Name into the form, using Contact rather than Name (instead of test) and that just put the username in both times. Do I need to change the >username bit as well?
#232837
  • Posts: 2154
  • Karma: 67
  • Thank you received: 264

DarkoCujic replied the topic: Is it possible to pre-propagate username in cb form?

Hey,

no, you don't have to change username part. Only if you need something else other than the username.

Please refer to this article from Joomla docs: docs.joomla.org/Accessing_the_current_user_object

Let me know if you need anything else.

Regards,
Darko

Satisfied with our support? PayPal tips
===========
Need to renew Pro Support? Buy Here!
===========
Satisfied? Consider a membership!
===========
Like us on Facebook
===========
Support Crosstec and get ALL EXTENSIONS and professional support for just $5. Here!
#232852
  • Dragonrider
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 43
  • Thank you received: 1

Dragonrider replied the topic: Is it possible to pre-propagate username in cb form?

Ah, it makes sense now, thank you.

The values I was trying to add, hadn't been set in the registration form! Doh!

However, I have figured out how to add the current date for the closing date for applications so that those not familiar with computers can see the expected format AND an explaination of what the (in my case) blue box is (ie: a Popup Calendar).

Again, many thanks!
#232885
  • Posts: 2154
  • Karma: 67
  • Thank you received: 264

DarkoCujic replied the topic: Is it possible to pre-propagate username in cb form?

You're welcome. I'm glad I helped.

Let us know should you need anything else.

Regards,
Darko

Satisfied with our support? PayPal tips
===========
Need to renew Pro Support? Buy Here!
===========
Satisfied? Consider a membership!
===========
Like us on Facebook
===========
Support Crosstec and get ALL EXTENSIONS and professional support for just $5. Here!
#232898
  • Posts: 34
  • Thank you received: 0

moozarkgrl replied the topic: Is it possible to pre-propagate username in cb form?

I need my form to automatically fill in the user's name and email. I used the Before Form piece you said. I think it's not working because of possible formatting issues? The username field is "clientname". Here's my 2 attempts that did not work:

$this->execPieceByName('ff_InitLib');
$username = JFactory::getUser()->username;
ff_setValue($username, 'clientname');

$this->execPieceByName('ff_InitLib');
$username = JFactory::getUser()->username;
ff_setValue($username, clientname);

What am I doing wrong?
#233224
  • Posts: 2154
  • Karma: 67
  • Thank you received: 264

DarkoCujic replied the topic: Is it possible to pre-propagate username in cb form?

Hey Moozarkgrl,

I'm pretty sure the error is in the syntax of ff_setValue. It's supposed to go like this:
ff_setValue('name-of-field', 'value-to-place-inside');

So, in your case, it would go like this:
$this->execPieceByName('ff_InitLib');
$username = JFactory::getUser()->username;
ff_setValue('clientname', $username);

Let me know if it works now.

Regards,
Darko

Satisfied with our support? PayPal tips
===========
Need to renew Pro Support? Buy Here!
===========
Satisfied? Consider a membership!
===========
Like us on Facebook
===========
Support Crosstec and get ALL EXTENSIONS and professional support for just $5. Here!
#233240
Moderators: ForumSupporttomeperica
Time to create page: 0.078 seconds

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans & templates!

Get Your Subscription 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 for just 49! (Summer Sale)

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

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