Pre filled text boxes with Breezing Forms / FacileForms - Breezing Forms / FacileForms how to's

Pre filled text boxes with Breezing Forms / FacileForms. Here is how to have the username and email address automatically entered in your Breezing Forms / FacileForms form.

Home Joomla - VirtueMart Breezing Forms / FacileForms Pre filled text boxes with Breezing Forms / FacileForms
Pre filled text boxes with Breezing Forms / FacileForms
  • Joomla 1.5
  • Breezing Forms/
    FacileForms

It is often useful to have the username and/or email address of a logged in user pre-filled in your Breezing Forms / FacileForms form.
Here is how to have the username and email address automatically entered in your Breezing Forms / FacileForms form.



Breezing Forms / FacileForms dynamic Joomla username and email







Make a new text input as normal.

In the value box paste the following code for the username -
 
<?php $user =& JFactory::getUser(); return $user->get('name') ;?>
 


For the email address use the following code -
 
<?php $user =& JFactory::getUser(); return $user->get('email') ;?>
 

You can also show a dynamic greeting depending on whether the user is logged in or not.

Make a normal Static Text/HTML element. In the Text/HTML box use the following code -
 
<h2>Welcome 
<?php 
$user =& JFactory::getUser(); 
if ($user->get('name') != '') return $user->get('name'); else return 'Visitor';
?></h2>
 

Breezing Forms / FacileForms dynamic Joomla username & email insert
Last Updated on Wednesday, 16 December 2009 14:40
 

Latest Articles

VirtueMart
Your Cart is currently empty.

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.



Pre filled text boxes with Breezing Forms / FacileForms|Breezing Forms / FacileForms how to's



Pre filled text boxes with Breezing Forms / FacileForms. Here is how to have the username and email address automatically entered in your Breezing Forms / FacileForms form.


email, address, user, following, code, text, breezing, username, forms, facileforms, normal, return, html, use, box, logged, form, static, depending, visitor, element, welcome, greeting, useful, pre, value, automatically, input, paste, filled, entered, joomla, dynamic


guru

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.