Welcome, Guest

autoload registered user info in quickmode
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: autoload registered user info in quickmode

autoload registered user info in quickmode 2 years ago #11259

Can anyone tell me where I can insert code to auto-load registered user information. I know the code is <?php $user = &JFactory::getUser();echo $user->email;?> but every time I place the code in the value box it appears outside of the input box.
  • viscomvic
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0

Re: autoload registered user info in quickmode 2 years ago #11291

Hi,

use "return" instead of "echo".

Regards,
Markus
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Re: autoload registered user info in quickmode 2 years ago #11798

Hi Markus,

Where would I enter this code in the quick form? What element type would this be as well?

UPDATE - 2/11/10

For anyone else wondering: I pasted the above code into the value of a text box.
  • berlin80210
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Karma: 0
Last Edit: 1 year, 12 months ago by berlin80210.

Re: autoload registered user info in quickmode 1 year, 11 months ago #12624

I have tried pasting this into the "Value:" field of my form and it just shows the code in the text box in the front end form:
<?php $user = &JFactory::getUser();return $user->email;?>


How do I get the form to auto-populate the user info in the form?

I also need to populate data from another table in the DB (jos_ezrealty_leads), but if necessary I will duplicate that data in new fields I create in jos_users if the JFactory command won't let me pull data from another field in the DB.

Any help would be appreciated greatly. This extension rocks!!!

I have also tried:
<?php return JFactory::getUser()->get('email'); ?>

per the instructions in the FAQ section here, but to no avail.
  • erichhaubrich
  • OFFLINE
  • Senior Boarder
  • Web Ninja and Technology Geek
  • Posts: 62
  • Karma: 3
I love Breezing Forms! - It is the Killer App for Forms on Joomla!
  • Page:
  • 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.40 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany