Hello everybody
I'm working in a consulting firm and I have to create a registration form for consulting courses (saved in a registration table).
These courses are also made with chronoforms (by the admin, saved in a course table) and are saved in the DB.
Every course has two responsible person, which are declared with their e-mail adress (also saved in the course table).
After a customer has registered successfully for a course, they should receive an e-mail. In addition, the two responsible person should also receive an notification e-mail.
Now my question: How can I insert those e-mail adress from the responsible person in the registration from, so that when someone registers, they receive an e-mail? Since in the e-mail option, you only can choose a dynamic field, but how can I fill a field with a DB read?
My english is really bad, so if I explained something unclearly, please ask.
Greetings Jeri!
I'm working in a consulting firm and I have to create a registration form for consulting courses (saved in a registration table).
These courses are also made with chronoforms (by the admin, saved in a course table) and are saved in the DB.
Every course has two responsible person, which are declared with their e-mail adress (also saved in the course table).
After a customer has registered successfully for a course, they should receive an e-mail. In addition, the two responsible person should also receive an notification e-mail.
Now my question: How can I insert those e-mail adress from the responsible person in the registration from, so that when someone registers, they receive an e-mail? Since in the e-mail option, you only can choose a dynamic field, but how can I fill a field with a DB read?
My english is really bad, so if I explained something unclearly, please ask.
Greetings Jeri!
Hi Jeri,
Assuming that your responsible people are registered users I would save their IDs to the course table. Then use this FAQ to get their info.
Once you have their email, add it to the $form->data array and you can include the resulting value in the Dynamic To box of an Email action e.g. if the email is in $form->data['r_person_1'] add r_person_1 to the box.
Bob
Assuming that your responsible people are registered users I would save their IDs to the course table. Then use this FAQ to get their info.
Once you have their email, add it to the $form->data array and you can include the resulting value in the Dynamic To box of an Email action e.g. if the email is in $form->data['r_person_1'] add r_person_1 to the box.
Bob
Thx, its working!
I have another question.
I want to send a location link in the e-mail. The location url is stored in the course table and I write it to a hidden field.
But when I send the email, the link is only displayed like this : www.google.com..but what I accutally want is this : www.google.com.
Any suggestions?
Greetings jeri
I have another question.
I want to send a location link in the e-mail. The location url is stored in the course table and I write it to a hidden field.
But when I send the email, the link is only displayed like this : www.google.com..but what I accutally want is this : www.google.com.
Any suggestions?
Greetings jeri
Hi jeri,
Add it to the email as a link
Bob
Add it to the email as a link
<a href='http://www.google.com' >Click here</a>
Bob
I already tried that, but since the linke is from the DB, stored in a hidden field, I can't put it dynamicly in the <a href='..'...
like <a href={hiddenfield} >Click here</a> doesnt work or this way doesnt work either:
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select all records from table anmeldungenAlle
$query->select($db->quoteName(array('link')));
$query->from($db->quoteName('vbvtc_chronoengine_chronoforms_datatable_course', 'a'));
$query->where($db->quoteName('a.x') . ' = '. $db->quote($form->data['x']));
// Reset the query using our newly populated query object.
$db->setQuery($query);
$row = $db->loadAssocList();
$variable = $row['0']['link'];
<a href="$variable" target="wohin">Click here</a>'
like <a href={hiddenfield} >Click here</a> doesnt work or this way doesnt work either:
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select all records from table anmeldungenAlle
$query->select($db->quoteName(array('link')));
$query->from($db->quoteName('vbvtc_chronoengine_chronoforms_datatable_course', 'a'));
$query->where($db->quoteName('a.x') . ' = '. $db->quote($form->data['x']));
// Reset the query using our newly populated query object.
$db->setQuery($query);
$row = $db->loadAssocList();
$variable = $row['0']['link'];
<a href="$variable" target="wohin">Click here</a>'
Hi Jeri,
You can use a Read DB Action to get the data from the database table. But your script should work except for the last line, please try
Bob
You can use a Read DB Action to get the data from the database table. But your script should work except for the last line, please try
<?php
echo "<a href='{$variable}' target='wohin' >Click here</a>";
?>
Bob
This topic is locked and no more replies can be posted.