Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fredrik Esseen 610 posts 906 karma points
    Aug 14, 2009 @ 15:54
    Fredrik Esseen
    0

    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.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Aug 14, 2009 @ 16:14
    Dirk De Grave
    0

    Doc2Form comes with a stylesheet, so you should be able to style the complete stuff using that css

     

    Cheers,

    /Dirk

  • bob baty-barr 1180 posts 1294 karma points MVP
    Aug 14, 2009 @ 16:15
    bob baty-barr
    0

    @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.

  • Fredrik Esseen 610 posts 906 karma points
    Aug 14, 2009 @ 16:27
    Fredrik Esseen
    0

    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..

  • bob baty-barr 1180 posts 1294 karma points MVP
    Aug 14, 2009 @ 21:32
    bob baty-barr
    0

    @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.

  • Fredrik Esseen 610 posts 906 karma points
    Aug 18, 2009 @ 09:39
    Fredrik Esseen
    0

    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)

  • Fredrik Esseen 610 posts 906 karma points
    Aug 18, 2009 @ 10:37
    Fredrik Esseen
    0

    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]
    =========================================

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Aug 18, 2009 @ 11:26
    Dirk De Grave
    100

    Dictionary items will only work if hostnames have been assigned to your (top level) node? Have you done that?

     

    Cheers,

    /Dirk

  • Fredrik Esseen 610 posts 906 karma points
    Aug 18, 2009 @ 11:38
    Fredrik Esseen
    0

    That worked like a charm :) THX!!!

Please Sign in or register to post replies

Write your reply to:

Draft