Sales Question?
Willkommen, Gast

THEMA: email template show user group

email template show user group 1 Jahr, 3 Monate her #68049

What is the code to have the logged in users group title be sent in the email template?
  • modernmagic
  • OFFLINE
  • Expert Boarder
  • Beiträge: 99
  • Karma: 0
Joomla website design and management modernmagic.com

Re: email template show user group 1 Jahr, 2 Monate her #68262

Hi,

try this:

add a hidden input to your form and use this as default value:

<?php $gnames = ''; $groups = JFactory::getUser()->get('groups'); foreach($groups as $groupName=>$groupId) {  $gnames .=  $groupName . ' '; }; return $groups;   ?>
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
Letzte Änderung: 1 Jahr, 2 Monate her von TheMuffinMan.

Re: email template show user group 1 Jahr, 2 Monate her #68888

Ok.

I have edited the administrator/components/com_breezingforms/mailtpl/mailbacktpl.txt.php to look like this:
<?php echo $PROCESS_SUBMITTERFULLNAME ?>: <?php echo $SUBMITTERFULLNAME ?><?php echo $NL ?>
<?php echo $userGroup ?>
<?php echo $PROCESS_FORMTITLE ?>: <?php echo $TITLE ?><?php echo $NL ?>
<?php foreach ($MAILDATA as $DATA): ?>
<?php echo $DATA[_FF_DATA_TITLE]?>: <?php echo $DATA[_FF_DATA_VALUE]?><?php echo $NL ?>
<?php endforeach; ?>

<?php if ($RECORD_ID != ''): ?>
<?php echo $PROCESS_RECORDSAVEDID?> <?php echo $RECORD_ID ?><?php echo $NL ?>
<?php endif; ?>


BUT the email looks like this:
Record saved to database with ID:  142

Form ID: 17
Form title: ISL Contact Form
Form name: contactform
Submitted at: 2012-03-01 14:28:00
Submitter IP: 98.189.0.205
User-ID: 46
Username: Betty
User full name: Betty Boop
Submitter provider: Unknown
Submitter browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11
Submitter operating system: mac


Why are my edits to mailbacktpl.txt.php not working?
  • modernmagic
  • OFFLINE
  • Expert Boarder
  • Beiträge: 99
  • Karma: 0
Joomla website design and management modernmagic.com

Re: email template show user group 1 Jahr, 2 Monate her #68950

Hi,

instead of this

<?php echo $userGroup ?>

use this

<?php echo implode(', ',JFactory::getUser()->get('groups')); ?><?php echo $NL ?>

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

Re: email template show user group 1 Jahr, 2 Monate her #69014

ok.

But my main issue is that I have edited the administrator/components/com_breezingforms/mailtpl/mailbacktpl.txt.php but it is not working.

The admin email options is set to default.
  • modernmagic
  • OFFLINE
  • Expert Boarder
  • Beiträge: 99
  • Karma: 0
Joomla website design and management modernmagic.com

Re: email template show user group 1 Jahr, 2 Monate her #69103

Hi,

edit it here please

/media/mailtpl/mailbacktpl.txt.php

The location has changed since build 757 to prepare BF for the easier update system that is coming in version 1.8

Regards,
Markus
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
Moderatoren: TheMuffinMan, ForumSupport
Ladezeit der Seite: 0.48 Sekunden

Über Crosstec

Crosstec GmbH & Co. KG

Hohenzollernring 57

50672 Cologne, Germany