• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Community Builder (CBE) + Order Form + User Profil

Community Builder (CBE) + Order Form + User Profil 12 years 6 months ago #15420

  • ictcare
  • ictcare's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Hi all.

I created a form for a Taxi company.
Now i want that logged in Users dont must fill out the order form with Name, Street, city etc.
It should get this information from CBE Profil where all Information stored.

But i have no idea how to solve it. :(
Did i must add a code by Default Value in RSFORM!PRO?

Link to the form
web170.server111.tldhost.de/index.php/bestellung2

Thanks for help!
The administrator has disabled public write access.

Re: Community Builder (CBE) + Order Form + User Profil 12 years 6 months ago #15428

  • ictcare
  • ictcare's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
I found this code:

//<code>
$db =& JFactory::getDBO();
$db->setQuery("SELECT your_value FROM your_table");
$result = $db->loadResult();
return $result;
//</code>

i changed the Value AND Table to get the Name from Users.
And pasted to code as Default Value.
But now shows me always the Name from my Test User also when im not logged in.

Could somebody help me?
I think it should possible to solve with a if else script like

If Customer logged in Default = this code else default value = 0
The administrator has disabled public write access.

Re: Community Builder (CBE) + Order Form 12 years 6 months ago #15429

  • ictcare
  • ictcare's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
I found this code:

//<code>
$db =& JFactory::getDBO();
$db->setQuery("SELECT your_value FROM your_table");
$result = $db->loadResult();
return $result;
//</code>

i changed the Value AND Table to get the Name from Users.
And pasted to code as Default Value.
But now shows me always the Name from my Test User also when im not logged in.

Could somebody help me?
I think it should possible to solve with a if else script like

If Customer logged in Default = this code else default value = 0
The administrator has disabled public write access.

Solved! 12 years 6 months ago #15430

  • ictcare
  • ictcare's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
I found now the soloution self :)
Its very hidden on this site:

With RSForm!Pro you can display variables like user information (if the user is logged in) directly in the form components that you create.

Examples:

Assuming that you want to create an e-mail form component, and by default, if the user is logged in, to enter it's registration e-mail in the Email field. Here's how to do it:
Create a textbox component
In the Default Value, type this code:

//<code>
$rsuser=JFactory::getUser();
$user=$rsuser->get('email');
return $user;
//</code>

This piece of code (including the // tags) loads the user information in the $user variable. Here's what you can use:
$rsuser->get('id') = user id
$rsuser->get('username') = the username
$rsuser->get('name') = registration full name
$rsuser->get('email') = registration email

Greets Rene
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!