TOPIC:

Form variable for users email address 1 week 2 hours ago #273838

  • Topic Author
  • awaddon
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 10
  • Thanks: 0
Hi

I see breezing forms has numerous variables for use in the html emails like the ones below, but I need one to get the logged in users email address, is there one that fetches that?

I have tried the logical one of PROCESS_SUBMITTEREMAIL but that doesn't work.

I have also seen ones that have a prefix different to the below as 'BF_' instead of 'PROCESS_', does that make a difference? I tried BF_SUBMITTEREMAIL too but didn't work either.

Is there a variable to get the submitters email?

Thanks

Andy




RECORD_ID: Display the unique record number assigned to the submitted form.

PROCESS_FORMID: Displays the unique ID assigned to the form.

PROCESS_FORMTITLE: Displays the title of the form.

PROCESS_FORMNAME: Displays the name of the form.

PROCESS_SUBMITTEDAT: Date and time the form was submitted.

PROCESS_SUBMITTERIP: IP address of the user who submitted the form.

PROCESS_SUBMITTERID: If a registered user, will display the user's ID number.

PROCESS_SUBMITTERUSERNAME: If a registered user, will display the user's username.

PROCESS_SUBMITTERFULLNAME: If a registered user, will display the user's full name.

PROCESS_PROVIDER: If available, will display the user's provider.

PROCESS_BROWSER: Displays the submitter's browser information.

PROCESS_OPSYS: Displays the submitter's Operating System information.

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

Form variable for users email address 1 week 2 hours ago #273839

  • Mirec's Avatar
  • Mirec
  • Away
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2486
  • Karma: 2
  • Thanks: 135
Hi,

I'm on break!
I will take a look this when I back!

Regards,
Mirko

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

Form variable for users email address 1 week 2 hours ago #273840

  • tihana.krivic's Avatar
  • tihana.krivic
  • Online
  • Moderator
  • Moderator
  • Posts: 10073
  • Karma: 3
  • Thanks: 679
Hi,

this information is for php mail.

You can do this on another way.

Please go to form->Advanced->More options->Before form->check Custom and put:
$this->execPieceByName('ff_InitLib'); //Include BreezingForms Library
$db = JFactory::getDBO();//Get Database Object
$user = &JFactory::getUser();//Get user Object
 
//Create your own query 

$db->setQuery('Select email From #__users Where id='.$user->id);  
$result = $db->loadResult(); //load the result from the query

ff_setValue('ElementName1', $result); // populate the value in the form. Change ElementName1 to the real name of your element
Please replace ElementName1 with name of element in which you want to show user email.

Then in html email you can use it like ( I assume that you have cheked custom in admin emails/mailback emails):
{nameofelement:label}{nameofelement:value}
where nameofelement is name of element in which you want to show logged in email

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

Form variable for users email address 1 week 37 minutes ago #273847

  • Topic Author
  • awaddon
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 10
  • Thanks: 0
Thanks but that didn't seem to work,

I assume you meant in the 'form pieces' section and 'before form'?

This is what I have used and did as you said by replacing the element name:


$this->execPieceByName('ff_InitLib'); //Include BreezingForms Library
$db = JFactory::getDBO();//Get Database Object
$user = &JFactory::getUser();//Get user Object

//Create your own query

$db->setQuery('Select email From #__users Where id='.$user->id);
$result = $db->loadResult(); //load the result from the query

ff_setValue('userEmail', $result); // populate the value in the form.



and on my html email I used {userEmail:label}:{userEmail:value}  but it came out blank

Thanks

Andy

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

Form variable for users email address 1 week 22 minutes ago #273849

  • Mirec's Avatar
  • Mirec
  • Away
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2486
  • Karma: 2
  • Thanks: 135
Hi,


hmm, did you get any error messages in the browser console?

regards,
Mirko

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

Form variable for users email address 1 week 11 minutes ago #273851

  • Topic Author
  • awaddon
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 10
  • Thanks: 0
Ah yes i did:



BF-Trace
<strong>*** EXCEPTION CAUGHT BY BREEZINGFORMS ***</strong>
PHP error level : E_DEPRECATED
PHP filename : /home/virtual/vps-6c6422/7/77d94c6ce1/williams.marketingportal.uk/components/com_breezingforms/facileforms.process.php(1245) : eval()'d code
PHP linenumber : 6
Last known pos : Piece ff_InitLib at line 1
Error message : Array and string offset access syntax with curly braces is deprecated


<strong>*** EXCEPTION CAUGHT BY BREEZINGFORMS ***</strong>
PHP error level : E_NOTICE
PHP filename : /home/virtual/vps-6c6422/7/77d94c6ce1/williams.marketingportal.uk/components/com_breezingforms/facileforms.process.php(1245) : eval()'d code
PHP linenumber : 3
Last known pos : Before form custom piece code at line 1
Error message : Only variables should be assigned by reference

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

Moderators: ForumSupport
Time to create page: 0.051 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!