Forums

Create form with one choicefield but send userinformation in the mail/

joeriFranck 29 Aug, 2023
I have a chronoforms version 6, using this code to get userinfo and send it via mail.

<?php
jimport( 'joomla.user.helper' );
$user = JFactory::getUser();
$userId = $user->id;
$userName = $user->name;
$userUserName = $user->username;
$userEmail = $user->email;

$userProfile = JUserHelper::getProfile( $userId );

$this->data['user_id'] = $user->id;
$this->data['user_name'] =$userName;
$this->data['user_username'] =$userUserName;
$this->data['user_email'] =$userEmail;
$this->data['user_lidnummer'] =$userProfile->profile['lidnummer'];
$this->data['user_voornaam'] =$userProfile->profile['voornaam'];
?>
I want to make this to version 8 but cannot find out how. Is there a manual for version 8

Kind regards
Max_admin 29 Aug, 2023
I think this code should work the same in v8, place it inside a PHP action (but remove the PHP tags) BEFORE the "Email" action, then try to use {data:user_name} in your email and check this works.

you may also use a Message after the PHP block, because once the PHP action runs, the data variables should be available to all next actions/views
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
joeriFranck 29 Aug, 2023



How about this, it is completely different. can i find a manual, of could you make your forum searchable?
Kind regards
You need to login to be able to post a reply.