Copied to clipboard

Flag this post as spam?

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


  • Paul 184 posts 646 karma points
    Sep 11, 2019 @ 15:40
    Paul
    0

    One form to send multiple emails to different addresses with different titles?

    Hi everyone,

    I've got a query regarding the feasibility of something and I'm hoping someone who's spent a bit more time working on forms can advise if it's possible !

    What I'd like is a form where a user completes their details at the top (e.g. name, email address etc) then they're asked a series of questions like:

    • Do you have a google account?
    • Do you have a facebook account?
    • Do you have a Twitter account?

    If they answer yes to one (or more of these) an email is sent out. E.g. answer yes to Google and an email titled "Google email" goes to [email protected].

    So if they answer yes to all three, three separate emails go out to different email addresses with email titles that are different.

    In an absolutely ideal world I'd just have the initial user details and the pertinent question set sent out per different email. E.g. Answer yes to Twitter account, and an email titled "twitter" goes to [email protected] with a subject of Twitter and it contains the initial user details and the answer to the Twitter question (but not the answer to the Google/Facebook question)

    Has anyone tackled anything like this previously?

    Environment: Umb 7.15.1 & Forms 7.0.6 (though if it helps I could bump them to 15.3 & 7.1.3)

  • Lars Heesakkers 37 posts 193 karma points
    Sep 12, 2019 @ 11:46
    Lars Heesakkers
    0

    You can add a custom workflow for your form and handle the mails in code. https://our.umbraco.com/Documentation/Add-ons/UmbracoForms/Developer/Extending/Adding-a-Workflowtype

  • Paul 184 posts 646 karma points
    Sep 12, 2019 @ 16:19
    Paul
    0

    Thanks Lars, I did have a quick look at that but wasn't 100% sure it'd be able to do what I wanted; hence asking about feasibility. Looks like I've just got to have a go with it now and see what's possible.

  • Paul 184 posts 646 karma points
    Mar 10, 2020 @ 09:12
    Paul
    101

    To close this thread off, I ended up using the following:

    https://github.com/a2wd/UmbracoForms.ConditionalWorkflows

    This feature should be OOTB in Umb Forms.

  • Heather 13 posts 125 karma points
    Jun 30, 2020 @ 15:45
    Heather
    0

    This should be out of the box as a workflow in Umbraco Forms. I did try to use the extension UmbracoForms.ConditionalWOrkflows by a2wd but this did not work on the latest version of Umbraco Forms. I wanted to mention this just to prevent some headache. :)

  • Matt 353 posts 825 karma points
    Jul 02, 2020 @ 07:03
    Matt
    0

    Anyone know how I can get this to work with Umbraco 8?

    Thanks

  • Matt 353 posts 825 karma points
    Jul 09, 2020 @ 09:51
    Matt
    0

    Anyone know how I can achieve this?

    I want the front end user to be able to choose who they want to email which would email the form to the select person.

    I'm using Umbraco 8 forms.

    Thanks

  • Rubinho 30 posts 218 karma points
    Jul 14, 2020 @ 12:42
    Rubinho
    1

    I had the same issues and found an easy way to fix this:

    I added the selectable prevalues twice, first the label, then the emailaddress. After this, add the next label and add the emailaddress like so:

    Sales question
    [email protected]
    Technical question
    [email protected]
    

    and so on.

    Then, add the following script to your frontend and let it execute on load: This will merge the 2 items and will change the values and makes the other one invisible.

    $(".umbraco-forms-page select option").each(function() {
        var $item = $(this);
        var $nextItem = $(this).next();
        if(!$item.val().includes("@") && $nextItem && $nextItem.val().includes("@"))
        {
            $item.val($nextItem.val());
            $nextItem.hide();
        }
    });
    
Please Sign in or register to post replies

Write your reply to:

Draft