Copied to clipboard

Flag this post as spam?

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


  • Jon 71 posts 145 karma points
    Mar 01, 2021 @ 15:16
    Jon
    0

    Umbraco Form - style default email

    Hi,

    We want to send a message to a person who has submitted a form using the normal "Send Email" workflow. At the moment the style of the email is very basic. Is there a way to style it a bit so it looks a bit cleaner?

    Thanks

  • Mehmet Avcı 32 posts 124 karma points
    Mar 01, 2021 @ 15:31
    Mehmet Avcı
    0

    Hi Jon,

    Basic email template is placed under Views\Partials\Forms\Emails. You can either modify this one or add another one for yourself. For additional info you can check forms documentation also.

    Best, Mehmet

  • Jon 71 posts 145 karma points
    Mar 01, 2021 @ 15:33
    Jon
    0

    Hi - We dont want to use the Basic Template as we can not add a message to the form - this template only displays the fields on the form.

    We basically want the CMS editor to add a Thank you message in an email and send it to the submitter as confirmation. But the Templated email does not add the message.

    The default "Send Email" workflow allows you to add a message but it is not styled well.

  • Mehmet Avcı 32 posts 124 karma points
    Mar 01, 2021 @ 15:45
    Mehmet Avcı
    0

    Hi Jon,

    Simply you can alter the template and remove the messages. If you want to keep that functionality you might want to add a new workflow that just fits your desire to send a simple thank you message. You won't even need a template then.

    I hope this works out for you.

    Best,

    Mehmet

  • Jon 71 posts 145 karma points
    Mar 01, 2021 @ 15:55
    Jon
    0

    Apologies - we want the CMS editor to be able to add a confirmation message in an email.

    We want to use the "send email" workflow but would like to style it.

    Is it possible to style the "Send email" workflow email?

  • Mehmet Avcı 32 posts 124 karma points
    Mar 01, 2021 @ 16:06
    Mehmet Avcı
    0

    Hi Jon,

    Updating template is mentioned in my first message. However, in order to add an extra message in cms afaik you should create a new workflow.

  • Jon 71 posts 145 karma points
    Mar 01, 2021 @ 16:07
    Jon
    0

    We dont want to have to create a new workflow in code each time a CMS editor adds a new form, with a new message. The CMS editor needs to do this all by themselves with no coding.

  • Mehmet Avcı 32 posts 124 karma points
    Mar 01, 2021 @ 16:10
    Mehmet Avcı
    0

    No you don't need to do so. Once you create it, content editor pick this new workflow, add customized message and just reuse it.

    Only requirement for content editor is to pick the workflow you create when a form is created.

  • Jon 71 posts 145 karma points
    Mar 01, 2021 @ 16:12
    Jon
    0

    AH! - I think I understand - so it is possible to create a workflow with a textarea or RTE?

  • Mehmet Avcı 32 posts 124 karma points
    Mar 01, 2021 @ 16:13
    Mehmet Avcı
    0

    Of course. you can even add several.

  • Jon 71 posts 145 karma points
    Mar 01, 2021 @ 16:14
    Jon
    0

    Great - do you know how I can add a workflow with an RTE?

  • Mehmet Avcı 32 posts 124 karma points
    Mar 01, 2021 @ 18:37
    Mehmet Avcı
    0

    Not sure about RTE. I am not even sure if Forms support RTE in there.

    But you do have options. For example a sample class for a workflow with properties should look like this.

    public class SampleWorkflow : WorkflowType
    {
        #region Workflow Properties
    
        [Setting("Email", description = "Enter the receiver email", view = "TextField")]
        public string Email { get; set; }
    
        [Setting("Subject", description = "Enter the subject", view = "TextField")]
        public string Subject { get; set; }
    
        [Setting("Message", description = "Enter the intro message", view = "TextArea")]
        public string Message { get; set; }
    
        [Setting("Attachment", description = "Attach file uploads to email", view = "Checkbox")]
        public string Attachment { get; set; }
    
        #endregion
    
    
        public SampleWorkflow()
        {
            // Need to generate a new guid for the new custom workflow - add your own GUID
            Id = new Guid("54c58a4a-27ec-4337-afed-908aa33bf3ef");
            Name = "Sample Workflow";
            Description = "Sample Workflow";
        }
    
    
    
        public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
        {
            throw new NotImplementedException();
        }
    
        public override List<Exception> ValidateSettings()
        {
    
            throw new NotImplementedException();
        }
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft