TOPIC:

Set Value textfield username logged Breezingform 4 months 3 weeks ago #259675

  • Topic Author
  • shenares
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 41
  • Thanks: 0
Hi,

We would like to set a username logged in a textfield, how we can set this value in Init Script?

BR,

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

Set Value textfield username logged Breezingform 4 months 3 weeks ago #259680

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 7381
  • Karma: 3
  • Thanks: 529
Hi,

please go to your form->Advanced->More options->Script->Initialization script->check Custom->click Create code framework-> inside the generated function, between opening { and closing }, add this:
ff_getElementByName("nameoftextfield").value = "<?php return JFactory::getUser()->get('username',''); ?>";
Please replace nameoftextfield with name for textfield (not title)

Also, you can do on easier way:
go to textfield->Properties->Value and put:
<?php $user = JFactory::getUser(); return $user->username; ?>

Regards,
Tihana
The following user(s) said Thank You: shenares

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

Last edit: Post by tihana.krivic.

Set Value textfield username logged Breezingform 4 months 3 weeks ago #259683

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 664
  • Karma: 4
  • Thanks: 112
Hello.

This documentation will help you achieve what you want

crosstec.org/en/support/online-documenta...and-classicmode.html

Regard,
Eddy

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

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

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

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!