Is it possible to style the message delivered from Doc2Form? I have a contact form that deliveres an email to my user with information from the contactform. In the email its displayed with lots of air between the different form elements and is separated with dashes. I would like to customize that layout.
@froad -- yes, it is very possible to style the email by using a dictionary item as the email body...
you refrence the dictionary item in the macro insert with the [#itemName] syntax i believe...
in the dictionairy item, you can use basic html markup if you want [even image tags -- be sure to use absolute paths] and you can insert the variable data from the doc2form with the [propertyName] syntax.
@froad... here is how the syntax would look in the macro...
ResponseMessage="#corpResponse"
so you have a dictionary item name corpResponse
and the dictionary item looks kinda like this...
A website submission from the designer form has been submitted:
=========================================
Name: [designerFname] [designerSname] Company: [designerCompanyName] Website: [designerCompanyWebsite] What Does Company Do? [designerCompanyDo] Company Position: [designerCompanyPosition] Phone: [designerLandline] Mobile Phone: [designerMobile] Email Address: [designerEmail] Number of Employees: [designerEmployees] VAT Certified: [designerVAT] Designer CSS: [designerCSS]
=========================================
Number of Products: [designerNumberProducts] Type of Products: [designerWhatType] When ready to start: [designerWhenBegin]
Project Description: [designerProjectDescription]
where all the items refrenced in [itemHere] syntax are the aliases the form fields you are using on your docType... if you want to use html, i believe you can.
Im now trying to use the doc2form to send my email. My macro looks like this:
<umbraco:Macro NextButtonText="" PreviousButtonText="" SubmitButtonText="Skicka" StorePropertiesInCookies="avresetid, email, fax, from, company, hometime, postadress, postnr, resedatum, telefon, to, offertvia, retravel" RedirectToNode="" TextOnSubmit="Tack för din offertförfrågan!" PageTabs="0" TabName="content" DocumentType="1103" RequiredText="" ShowDescriptions="0" HideTabNames="1" FormToEmailAddress="[email protected]" FormMessage="" FormSubject="Offertförfrågan från hemsidan" DefaultValueNode="" UseAjax="0" FormFromEmailAddress="[email protected]" ResponseMessage="#Response" ResponseSubject="Offertförfrågan från webbplatsen" SendEmailResponse="1" EmailForm="0" ResponseCopyTo="" ResponseEmailFieldAlias=", " Alias="Doc2FormEmail" runat="server"></umbraco:Macro>
The question is if EmailForm has to be set as 1 and if SendEmailResponse has to be 1? When I set EmailForm to 1 I get an error with my smtp (no connection could be made because the target machine actively refused it)
It was solved by contacting the host and restarting the smtp-server..
Now the email is sent but contains nothing. It seems that it doesnt pick up the #Response from the dictionary? It should at least pick up the static text contained in the dictionary item. The item looks like this:
En offertförfrågan har lämnats på webbplatsen:
========================================= Resedatum: [resedatum] Avresetid: [avresetid] Från: [from] Till: [to] Återresa [retravel] Hemkomsttid: [hometime] Antal personer: [personnumber] Företag: [company] Namn: [name] Adress: [adress] Postnummer: [postnr] Postadress: [postadress] E-post: [email] Telefon: [telefon] Fax: [fax] Vi vill ha offerten via: [offertvia] =========================================
Styling Email in Doc2Form
Is it possible to style the message delivered from Doc2Form? I have a contact form that deliveres an email to my user with information from the contactform. In the email its displayed with lots of air between the different form elements and is separated with dashes. I would like to customize that layout.
Doc2Form comes with a stylesheet, so you should be able to style the complete stuff using that css
Cheers,
/Dirk
@froad -- yes, it is very possible to style the email by using a dictionary item as the email body...
you refrence the dictionary item in the macro insert with the [#itemName] syntax i believe...
in the dictionairy item, you can use basic html markup if you want [even image tags -- be sure to use absolute paths] and you can insert the variable data from the doc2form with the [propertyName] syntax.
have done this several times for clients.
Hope this helps.
I had a look at the stylesheet but I cant fint any style referencing to the email..? Should have been dashed somewhere in there..
Using dictionary sounds promising! Could you display some sort of example..? Never used dictionary items before..
@froad... here is how the syntax would look in the macro...
ResponseMessage="#corpResponse"
so you have a dictionary item name corpResponse
and the dictionary item looks kinda like this...
A website submission from the designer form has been submitted:
=========================================
Name: [designerFname] [designerSname]
Company: [designerCompanyName]
Website: [designerCompanyWebsite]
What Does Company Do? [designerCompanyDo]
Company Position: [designerCompanyPosition]
Phone: [designerLandline]
Mobile Phone: [designerMobile]
Email Address: [designerEmail]
Number of Employees: [designerEmployees]
VAT Certified: [designerVAT]
Designer CSS: [designerCSS]
=========================================
Number of Products: [designerNumberProducts]
Type of Products: [designerWhatType]
When ready to start: [designerWhenBegin]
Project Description:
[designerProjectDescription]
where all the items refrenced in [itemHere] syntax are the aliases the form fields you are using on your docType... if you want to use html, i believe you can.
Im now trying to use the doc2form to send my email. My macro looks like this:
The question is if EmailForm has to be set as 1 and if SendEmailResponse has to be 1? When I set EmailForm to 1 I get an error with my smtp (no connection could be made because the target machine actively refused it)
It was solved by contacting the host and restarting the smtp-server..
Now the email is sent but contains nothing. It seems that it doesnt pick up the #Response from the dictionary? It should at least pick up the static text contained in the dictionary item. The item looks like this:
En offertförfrågan har lämnats på webbplatsen:
=========================================
Resedatum: [resedatum]
Avresetid: [avresetid]
Från: [from]
Till: [to]
Återresa [retravel]
Hemkomsttid: [hometime]
Antal personer: [personnumber]
Företag: [company]
Namn: [name]
Adress: [adress]
Postnummer: [postnr]
Postadress: [postadress]
E-post: [email]
Telefon: [telefon]
Fax: [fax]
Vi vill ha offerten via: [offertvia]
=========================================
Dictionary items will only work if hostnames have been assigned to your (top level) node? Have you done that?
Cheers,
/Dirk
That worked like a charm :) THX!!!
is working on a reply...