Copied to clipboard

Flag this post as spam?

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


  • Yannick Sutter 4 posts 74 karma points
    Jun 14, 2019 @ 13:37
    Yannick Sutter
    0

    E-Mail Template with Workflowsettings

    Hello,

    I have written a custom workflow for Umbraco Forms which sends e-mails. A download link for the user should now be provided in a mail. My idea was to select the download file in the settings for the workflow and then insert it into the template, but I don't know how I get the settingsinformation in the template. Does anyone have an idea or maybe another approach?

    Thank you,

    Yannick

  • Lewis Logan 21 posts 132 karma points
    Jun 18, 2019 @ 11:25
    Lewis Logan
    0

    Hi Yannick,

    Unfortuntely I don't have an exact answer on this but I'd definitely like to know as it may be something i'll need in the future.

    However, depending on your requirements, you could provide a string input for the user to enter a url to the file and use that in your workflow.

    I did something similar when I needed certain forms to redirect to certain urls.

    [Umbraco.Forms.Core.Attributes.Setting("Redirect Url", description = "Enter the Url to redirect to. If left blank, the page will referesh and show the success message if available")]
    public string RedirectUrl { get; set; }
    
    public UrlRedirectWorkflow()
    {
        // Need to generate a new guid for the new custom workflow - add your own GUID
        this.Id = new Guid("2ee335a5-50f8-4c95-a597-fde9b41959da");
        this.Name = "Contact Redirect";
        this.Description = "Redirect user after completing the contact form";
    }
    

    This created a setting on the work flow called Redirect Url.

    I hope this helps short term. Kind Regards,

    Lewis

  • Yannick Sutter 4 posts 74 karma points
    Jun 18, 2019 @ 11:51
    Yannick Sutter
    0

    Thank you Lewis for your answer.

    Well, I already added such a field to my settings, but I don't see how I access these Settings in the email template(razor). I got only the data of the formfields in my email

    Kind Regards

    Yannick

  • Lewis Logan 21 posts 132 karma points
    Jun 18, 2019 @ 12:45
    Lewis Logan
    0

    Hi Yannick,

    Again, a suggestion: You may want to try creating a new workflow that send emails.. The default one can be found here:

    https://gist.github.com/TimGeyssens/6ff5392c4d9bbf89bdfc

    Then you can hopefully manipulate this to incorporate your extra settings.

    Kind Regards, Lewis

Please Sign in or register to post replies

Write your reply to:

Draft