Notifications - User Confirmation
Permalink Browser Info Environment
IS it possible to have the form data included in the user confirmation email?
Type: | Discussion |
---|---|
Status: | New |
Yes, as long as you have Data Display as well, the confirmation email can be set up similarly to a Data Display template. I've not documented this feature yet, but it certainly can be done.
I do have Data Display installed also.
# concrete5 Version
5.5.2
# concrete5 Packages
Advanced Forms (1.7.3), Data Display (2.5.1), eCommerce (2.7.1), Login (1.1), Luminosity Theme (1.5.1
Looking forward to the documentation if it available.
# concrete5 Version
5.5.2
# concrete5 Packages
Advanced Forms (1.7.3), Data Display (2.5.1), eCommerce (2.7.1), Login (1.1), Luminosity Theme (1.5.1
Looking forward to the documentation if it available.
If you're familiar with creating a Data Display template, it's the exact same structure - you just have to input the placeholder data manually. I'll see if I can make this a little more user-friendly in an upcoming version.
I am somewhat familiar with Data Display Templates, I have created one and it does show data from the form.
Where would I put the placeholders to have them show up in the user confirmation email?
Where would I put the placeholders to have them show up in the user confirmation email?
Is thIs information available anytime before the next release?
Advanced Forms -> Notifications -> Message (on the User Confirmation tab).
Yes I see the place to add a message. Is this also where we would put the new data display to include the form data? What is the format for including the data display in the user message?
It's the same as the Data Display templates themselves. <field name="Whatever" />.
Or incase you don't want to have to shell out $75 bucks, modify the file packages/sixeightforms/models/answer_set.php.
replace the function
with
Then in your notification e-mail template use %%fieldname%% to get the fields value.
replace the function
public function sendConfirmation() { $f = sixeightform::getByID($this->fID); $fields = $f->getFields(); if(Package::getByHandle('sixeightdatadisplay')) { $ddBT = BlockType::getByHandle('sixeightdatadisplay'); $body = $ddBT->controller->generateTemplateContent($f->properties['confirmationEmail'],$f->getFields(),$this); $body = str_replace('<?php xml version="1.0"?>','',$body); $body = str_replace('<?php xml version="1.0"?>','',$body); $body = str_replace('<root>','',$body); $body = str_replace('</root>','',$body); $body = str_replace('<root></root>','',$body); $body = str_replace('<root ></root>','',$body); } else { $body = $f->properties['confirmationEmail']; }
Viewing 15 lines of 18 lines. View entire code block.
with
public function sendConfirmation() { $f = sixeightform::getByID($this->fID); $fields = $f->getFields(); if(Package::getByHandle('sixeightdatadisplay')) { $ddBT = BlockType::getByHandle('sixeightdatadisplay'); $body = $ddBT->controller->generateTemplateContent($f->properties['confirmationEmail'],$f->getFields(),$this); $body = str_replace('<?php xml version="1.0"?>','',$body); $body = str_replace('<?php xml version="1.0"?>','',$body); $body = str_replace('<root>','',$body); $body = str_replace('</root>','',$body); $body = str_replace('<root></root>','',$body); $body = str_replace('<root ></root>','',$body); } else { $body = $f->properties['confirmationEmail']; foreach($fields as $field)
Viewing 15 lines of 22 lines. View entire code block.
Then in your notification e-mail template use %%fieldname%% to get the fields value.
Hi Kelly
Just wanted to setup as you have instructed and was wondering where I find the email template to add %%fieldname%%
many thanks
Just wanted to setup as you have instructed and was wondering where I find the email template to add %%fieldname%%
many thanks