Creating a Contact Form Workflow


One of the most frequent usages of the workflows module in Orchard will probably be to send an email notification whenever a contact form is submitted. This tutorial will teach you how to create such a custom form, intercept when it is submitted by a user, and finally how to send a custom email based on the contents of the form.

The Contact Form

Enabling the Custom Forms module

To create a contact form and make it available on the website as a custom page, you first need to enable the Custom Forms module.

In the dashboard

  • Click on Modules
  • Look for Custom Forms in the Forms section
  • Click Enable

Creating the Contact Form content type

A new Custom Forms link appears on the admin menu. This feature will use an existing content type and make its editor available on the front end. Hence a custom type is necessary to represent our Contact Form.

  • Click on Content Definition
  • Click on Create New Type
  • Type Contact Form as the display name, the technical name is automatically auto-completed with ContactForm
  • Click Create
  • Uncheck the Creatable option, removing the link from the New section in the menu
  • Uncheck the Draftable option, preventing versions from being created
  • On the next screen click Save

The new content type is now available but is empty. We need to add some custom fields representing the values we want to gather from the user. This will be done using Orchard's standard content fields.


  • Click on Add Field
  • Enter Subject as the display name, the technical name is automatically auto-completed with Subject
  • In the field type drop down list select Text Field
  • Click Save

The field can be customized in order to make use an adapted editor and also to provide some help text on the front end.

  • Expand the section Subject (Text Field)
  • In the Display option drop down list select Wide
  • Check Required
  • Type The subject of your message (Mandatory) as the help text
  • Click Save


  • Click on Add Field
  • Enter Message as the display name, the technical name is automatically auto-completed with Message
  • In the field type drop down list select Text Field
  • Click Save

The field can be customized in order to make use an adapted editor and also to provide some help text on the front end.

  • Expand the section Message (Text Field)
  • In the Display option drop down list select Textarea
  • Check Required
  • Type Please provide the reasons why you are contacting us (Mandatory) as the help text
  • Click Save


  • Click on Add Field
  • Enter Contact as the display name, the technical name is automatically auto-completed with Contact
  • In the field type drop down list select Text Field
  • Click Save

The field can be customized in order to make use an adapted editor and also to provide some help text on the front end.

  • Expand the section Contact (Text Field)
  • In the Display option drop down list select Large
  • Check Required
  • Type Your email address (Mandatory) as the help text
  • Click Save

Publishing the contact form

The new content type is ready to be used as a form. There are two ways to publish it, by either providing a custom page for it with its own url, or by injecting it in existing pages using a widget. In this example we will use a dedicated page.

Publishing the custom form

  • Click on Custom Forms from the admin menu
  • Click on Add new Custom Form
  • Type Contact Us as the title
  • In the content type drop down list select Contact Form, which is the content type we just created
  • Check Save the content item once the form is submitted in order to persist the information which was submitted
  • Check Show on a menu and type Contact Us as the menu text
  • Click Save

Granting the permission

By default custom forms can't be filed by an anonymous user. As we want any of our website's users to be able to contact us, we need to add this permission to the Anonymous role.

  • Click on Users on the admin menu
  • Click on the Roles section
  • Click on the Edit link for the Anonymous role
  • Search for the Submit Contact Form forms permission and check Allow
  • Click Save

Testing the form

  • On the front end, sing-out and open the Contact Us page
  • File in the form and hit Submit
  • Log into the dashboard and click on Custom Forms
  • Click on the Submissions link for the Contact Us form

You can see that the new submission is available for the website editors.

The Workflow

Users can now submit new contact us forms to the website and in order to notify the owner of the website that a new message is available we will configure a custom workflow to send and email whenever a message is submitted.

Creating the Workflow

  • Click on Workflows on the admin menu
  • Click on Create new Workflow Definition
  • Type Contact Form notification as the name of the new workflow
  • Click Save
  • Drag and drop a Form Submitted activity
  • Double-click on the newly created activity, select Contact Us and click on Save
  • Select the activity again and click on the power-like button from the toolbar. This will set this activity as the starting event
  • Drag and drop a Notify activity on the board
  • Double-click on the newly created activity, select Information as the notification type, and enter A message was submitted as the message, then click Save
  • Connect the Form Submitted event to the Notify task using the blue dot connector on the Form Submitted
  • Click Save

Testing the workflow

  • On the front end, submit a new message
  • A notification should be displayed if the workflow was correctly configured

Sending the email

In order to send the email, the notification activity will be replaced by one sending an actual email. In order to do this we need to enable the Email module, and set it up.

  • Click Modules on the admin menu
  • Search for the Email Messaging module and enable it
  • Click on Email in the Settings section of the admin menu
  • File in the email setting based on your email provider information
  • Click Save
  • Click Workflows on the admin menu then edit the Contact Form notification workflow
  • Select the Notify activity and click on the cross in the toolbar. This will delete this activity
  • Drag and drop a new Send Email activity
  • Double-click on the newly created activity
  • Select Other in the Send to section
  • Enter a valid email address to receive the notification
  • Enter A new message is available as the subject
  • As the body of the email, enter the following text
A new message is available. <br /><br />

Subject: {Content.Fields.ContactForm.Subject} <br />
Message: {Content.Fields.ContactForm.Message} <br />
Contact: {Content.Fields.ContactForm.Contact} <br />
  • Click Save
  • Connect the Form Submitted event to the new task using the blue dot connector on the Form Submitted
  • Click Save

Testing the workflow

Now whenever a user submits a new message, you will receive an email like this one:


  • PickyPenguin said Reply

    Thanks so much for the tutorial! Tried to use both my yahoo email and gmail but none of them seems to work. Any suggestions?

  • label said Reply

    After exploring a number of the articles on your website,
    I seriously like your way of blogging. I saved as a favorite it to
    my bookmark website list and will be checking back soon.
    Take a look at my website too and tell me how you

  • Robin said Reply

    Hello and thx for the tutorial!

    In your tutorial I don't have the form submitted activity.

    Do you have any idea why?

    I'm going crazy over this one problem.

    Thx in advance!

  • Jacob said Reply

    Thank you very much for the tutorial..Its been like pulling a Hen's teeth trying to source information about Orchard Workflows from the Net.

    I have bookmarked your blog and shared it with my 20 fellow coders.

  • garcinia cambogia weight loss said Reply

    It's an amazing piece of writing designed for all the online viewers; they will obtain benefit from it I am sure.

  • garcinia cambogia extract reviews said Reply

    whoah this weblog is magnificent i like studying your posts.
    Keep up the good work! You know, many people are searching
    around for this info, you can help them greatly.

  • pure garcinia cambogia said Reply

    What's up it's me, I am also visiting this site on a regular basis, this web page
    is actually fastidious and the users are genuinely sharing nice thoughts.

  • said Reply

    That is a good tip especially to those fresh to the blogosphere.
    Brief but very precise info? Appreciate your sharing this one.
    A must read article!

  • Pillen Für haarwachstum said Reply

    Hi there, just became aware of your blog through Google, and found that it is truly informative.

    I'm going to watch out for brussels. I will appreciate if you continue
    this in future. A lot of people will be benefited from your writing.

  • custom essay writing service said Reply


  • Assignment-Glory said Reply

    Another message is accessible we will design a custom work process to send and email at whatever point a message is submitted.

  • Pay For Homework Help said Reply

    The proprietor of the site that another message is accessible we will design a custom work process to send and email at whatever point a message is submitted

  • Visit this link said Reply

    The tutuorial is so good explication even for those who want to learn something more.

  • top 5 penis enlargement pills said Reply

    vimax vimax vimax vimax vimax vimax vimax

  • Assignment Help said Reply

    I love your blog.. very nice colors & theme. Did you make this
    website yourself or did you hire someone to do it for you?
    Plz respond as I'm looking to create my own blog and would like to find out
    where u got this from. thanks

  • I Need Help Writing My Research Paper said Reply

    Excellent article. I will be experiencing some of these issues as well..

  • Simr Essayscorer said Reply

    I'm impressed, I must say. Seldom do I encounter a blog that's equally educative
    and interesting, and without a doubt, you've hit the nail on the head.

    The problem is something not enough folks are speaking intelligently
    about. Now i'm very happy I found this during my hunt for something concerning this.

  • generic 5mg cialis best price said Reply

    I'm really impressed with your writing skills as well as with
    the layout on your blog. Is this a paid theme or did you modify it yourself?
    Anyway keep up the excellent quality writing, it is rare to see a nice blog like
    this one these days.

  • generika said Reply

    Excellent post but I was wondering if you could write a
    litte more on this topic? I'd be very grateful if you
    could elaborate a little bit further. Many thanks!

  • BusinessFunding247 said Reply

    Hi, letting you know that can find your business a SBA or private loan for $2,000 - $350K Without high credit or collateral.

    Find Out how much you qualify for by clicking here:

    Minimum requirements include your company being established for at least a year and with current gross revenue of at least 120K. Eligibility and funding can be completed in as fast as 48hrs. Terms are personalized for each business so I suggest applying to find out exactly how much you can get on various terms.

    This is a free service from a qualified lender and the approval will be based on the annual revenue of your business. These funds are Non-Restrictive, allowing you to spend the full amount in any way you require including business debt consolidation, hiring, marketing, or Absolutely Any Other expense.

    If you need fast and easy business funding take a look at these programs now as there is limited availability:

    Have a great day,
    The Business Funding 247 Team

    unsubscribe/remove -

  • How to open Bet9ja account said Reply

    What is bet9ja? So what exactly is bet9ja? Perfectly,
    it is the most well-liked betting website in Nigeria.

    It supplies alternatives for all sorts of gamblers.
    Supporters of betting on online casinos, races,
    virtual video games or all varieties of sporting activities can locate it all on bet9ja.
    It is an exceptional service for anyone who enjoys gambling.
    You can enjoy for free just for the thrill of it
    or invest some hard cash in get to get paid true income.

    Bet9ja can be accessed from any machine with an World wide web relationship, so
    you can carry on enjoying even if you are away from your laptop.
    By now, you need to be seriously intrigued in how to participate in bet9ja, so allow us instruct you how to do it.
    How to enjoy bet9ja on-line To perform bet9ja on the web, you need to have to have an account.
    In order to get a single, go to, simply
    click Register in the leading ideal corner, fill in the registration sort and
    simply click Move forward. Right after a couple moments,
    you will get a affirmation letter to your e-mail, which will allow you
    to log in to the web-site. Use your login and password to log in and get started betting!

    There are a few principal means for how to put a
    bet on bet9ja. Listed here is the most basic process: Select your activity from
    the menu on the left. Pick out your match(s) and click Check out.
    Choose the situations you want to guess on and
    decide on your odds. Your possibilities will be quickly included to your betting slip.

    Fill in the Volume area, simply click Wager and then validate your bet by clicking Okay.
    If all went well, you would see a affirmation information with your guess
    ID. You can also use Occasion Title to place your wager.
    Right here is how you do it: Uncover your ideal celebration and simply click on it.
    Let us say it is a match concerning Aston Villa and Chelsea.

    If you simply click on the name that claims Aston Villa – Chelsea, you
    will see a new window open up with all readily available marketplaces for this occasion. If you
    have to have a trace on any of the readily available markets, just
    click on on the 'i' button to read through
    their descriptions. Then choose your wanted odds to automatically incorporate them to your coupon. Now all that is remaining to do is fill in the
    Quantity area and click Guess to verify it. The 3rd possibility
    revolves all over the Betting Industry tabs.

    Below is how to get all-around it: Decide on your sport in the menu on the
    left, pick the event and simply click view.
    At the major of the site, you will see many tabs that incorporate different
    markets. Go by way of the tabs and obtain the marketplaces you want to bet on. Following you have discovered your sought
    after sector, simply click on the odds of your selection to position a guess.
    Fill in the Amount of money area and confirm your bet by
    clicking Bet. But wait, there is far more: There is a
    single more way to perform that we have not instructed
    you about and it entails reserving a bet. For this method,
    you do not even have to sign-up. Just selected what you
    want to area your bet on, simply click Guess and you will get your booking
    number. You can either print it or send it to your e-mail.
    Following that, go to 1 of the bet9ja outlets, demonstrate the confirmation of your booked
    bet and make your payment to spot the bet. Be informed, on the other hand, that bet9ja odds can transform, so your wager will
    use the odds that was pertinent at the instant of payment.
    Bet9ja booking numbers can also be utilised on the web site in the Betslip portion to
    add additional picks to your slips. The place to find bet9ja fixtures Go through ALSO: Digital soccer
    league recommendations and tricks If you are looking for fixtures, below is
    how you can come across them: In the Sports activities
    area at the major of the website page, simply click on Data.
    A new separate window will open in your browser exhibiting several studies.
    In that window, choose your chosen activity, country and championship.
    To see the fixtures, obtain the Fixtures button at the best
    of the display screen and click on it. There, you can uncover all the information you need.
    Strategies on how to get a successful bet9ja scheduling prediction Now we have finally
    gotten to the most appealing element of this report — recommendations
    that will support you get a profitable prediction.
    Without having further more ado, below they are:
    Check out carrying superior odds instead of carrying a large sum of game
    titles. Even although they say not to put all of the eggs in one basket, this does not indicate
    that you need fifty baskets. You should really undoubtedly limit the sum of games
    you are betting on. If you can, you ought to
    limit on your own to carrying ten games. Instead, you have to aim on picking out far better
    odds on the smaller sized sum of video games. Perform a working ticket if you have to play numerous game titles.
    If having a prolonged ticket is certainly necessary for you,
    at the very least make it a jogging ticket.
    This indicates that your ticket should really be played all
    over the span of a several days or months. This tactic will allow for you to select sure games.
    Do not fail to remember about checking the studies. Make absolutely
    sure you do correct research right before you position your
    guess. Analyze the former game titles of the groups you
    want to bet on to figure out whether it is value it or not.
    Try to stay away from betting with no contemplating.
    If you are betting on soccer games, target on betting on aims.
    The most secure alternative, in particular for the betting newcomers, is to
    bet on ambitions as a substitute of dispersing your notice
    and cash on almost everything else. Do not be way too greedy.
    Betting may possibly look like a very effortless way to
    score income quickly. On the other hand, do not enable by yourself
    get too carried absent. Rate yourself, have a everyday/month-to-month restrict for your bets, never ever place all your money in one bet and under no circumstances expend you final cash on a guess.
    You may just shed it all. Now you know how to crack the
    bet9ja code. Hopefully, this posting has aided you determine out the finest way to participate in on bet9ja.
    Bear in mind: gamble responsibly and do not spend all your income
    on betting. We would like you all the luck in the planet!

    How to sign up?

    Super9ja is a totally free-to-enter marketing with a weekly jackpot prize of ten,000,000 Naira.
    The activity consists in predicting the scores
    of the six matches selected by every single week.

    To get element and have a likelihood to earn the jackpot or
    any of the weekly prizes, you ought to sign up your details at,
    login and post your entry before the Competition closes (Start of the initially match).

    When submitting your entry, you will also be requested to enter the Overall
    Plans scored in the 6 picked matches. Full Ambitions will be employed ONLY to
    establish winners in scenario of a tie. You are allowed a person entry for every week.
    You need to enter at the very least one particular match
    final result. You can change your predictions on the website as several situations as you like, up until finally the Competitors closes.

    How to enjoy?

    To enjoy Super9ja, only click on Engage in Super9ja, log in and enter the scores for the 6 matches
    provided. After you are delighted with your assortment,
    simply click on Post your entry. You should enter at least one match consequence.

    Your predictions will be saved and clearly revealed on the
    web site. Should you desire to change any of your predictions before the Level of competition closes (start off of the 1st match), you can do so by merely clicking on Edit Predictions and
    re-distributing your entry as soon as you have produced the amendments you

    Points are awarded as follows: ten details for every right score
    (prediction of the specific score of a match,
    ex. Chelsea v Arsenal one-) one position per suitable outcome (prediction of the consequence of a match, ex.

    Chelsea to win from Arsenal). A utmost of 10 details
    can be awarded for each match.

    Weekly benefits are demonstrated in the Chief board segment of the web
    page. See all consolation prizes.

    In the celebration of two or a lot more gamers having the exact number of points,
    tie-breaker requirements use (See conditions and conditions for specifics).

    Be aware: Gamers who win the Jackpot or any Mini Jackpot prizes are ranked in the weekly Leader board thus the
    range of consolation prizes for the applicable
    week will be reduced accordingly. E.g. If
    the Jackpot and the Mini Jackpot for predicting 8 accurate scores are
    awarded, the variety of consolation prizes on the related week
    will be lowered to 18 (commencing from the 3rd categorised downwards).

    Bet9ja pays a Jackpot truly worth ten,000,000 Naira to whoever predicts all 6 right
    scores. If two or extra gamers qualify for the Jackpot or consolation prize,
    the prizes will be split equally among people gamers.
    In addition, Bet9ja delivers consolation prizes for a overall of 265,000 Naira to the gamers
    who scored the highest quantity of Super9ja factors during the week.

    You can watch the success and live-time scores by clicking on Effects on Super9ja homepage.
    To see the weekly chief board, click on Chief-board.

    Want an extra consider for our Super9ja Jackpot? You can get extra tickets!

    one More Ticket: Stake one hundred Naira or a lot more on Sports
    two Added Tickets: Stake five hundred Naira or
    more on Sports activities
    3 More Tickets: Stake one thousand Naira or much more on Sports

    How to deposit and withdraw cash on your Bet9ja betting

    Some swift and simple ways to adhere to in buy to deposit and withdraw from
    Bet9ja account to assist you take pleasure in your betting knowledge

    As football lovers carry on to depend their blessings on Nigeria and their partnership with Bet9ja,right here are
    techniques to be adopted in get to deposit into a Bet9ja account in buy to get
    pleasure from the rewards this on the internet bookmaker has obtained in retail store for each and every football enthusiast.

    You can make cash if your soccer knowledge is good
    sufficient to predict the result of a video game.
    In get to location a guess you will need to have to
    register for a Bet9ja account. If you don't have a person currently you can indication up here.

    After you've got completed your registration, depositing is quick.

    Just log into your account, click on the deposit link on the primary monitor (illustrated on the correct).

    You can then see a monitor which presents you a range of deposit options.
    You can deposit by your naira debit card, bank acquire and Xpath.

    To deposit basically enter your specifics
    on the banking display screen and push deposit. Your transaction must be processed immediately and you will see the
    funds in your account, and you happen to be prepared to guess.

    You can withdraw your revenue as a result of bank transfer.
    Note there is a fee of one.5 % for withdrawal via bank transfer.
    If your transaction is approved then your financial institution account will be credited inside 24 hours.

    Indication up with Bet9ja for a twenty% reward hard cash

    How to sign up and perform Bet9ja on-line? fourteen times back 28363 sights by
    George Ibenegbu How can you register on Bet9ja on line and acquire fantastic prizes?

    It is time to uncover out all the hidden secrets of this most preferred betting web page in Nigeria.

    You will know how to be a component of this betting club in many methods.
    As a bonus, you will get the top 7 perform and get tips for starters.

    Bet9ja Sign-up procedure How to sign up on Bet9ja? First of all, you will have to have to enter
    the formal web site of Bet9ja. Soon after that, you will require to
    simply click on the sign up icons. You will obtain them in the major-still left corner of the monitor or click on on the register
    button on the bar which is furnished down below your
    cell variation of Bet9ja.

    Just after that, you just get to the registration menu
    where you will need to fill in your facts to sign up appropriately.
    First of all, you will need to sign-up your email address.
    It’s needed to make guaranteed that the email tackle is correct
    as you will get your verification code to this deal with.
    It’s recommended to use only Gmail, Microsoft outlook and yahoo mail.
    Do not ignore to confirm your email yet again. Immediately
    after the e-mail procedure, you may use your Advertising
    Code for the registration approach (if you have 1).
    Right after that, you will need to verify that you are alright with the Accountable Gaming
    Coverage. The past move is to simply click sign-up. When almost everything is
    done, you will get an invitation backlink to your e mail tackle.
    Just click on the activation to be resent to the webpage of registration.
    After that, you will get to the web page the place you will be requested to
    open up an account.

  • ProBusinessFunding said Reply

    Faster and Simpler than the SBA, can get your business a loan for $2K-350,000 With low-credit and no collateral.

    Use our short form to Find Out exactly how much you can get, No-Cost:

    If you've been established for at least one year you are already pre-qualified. Our Quick service means funding can be finished within 48 hours. Terms are specific for each business so I suggest applying to find out exactly how much you can get.

    This is a free service from a qualified lender and the approval will be based on the annual revenue of your business. Funds are also Non-Restrictive, allowing you to use the whole amount in any way including bills, taxes, hiring, marketing, expansion, or Absolutely Any Other expense.

    There are limited SBA and private funds available so please apply now if interested:

    Have a great day,
    The Pro Business Funding Team

    remove here -

  • Lauren Blakely Unzipped ebook said Reply

    What's up, after reading this amazing post i am
    as well cheerful to share my familiarity here with mates.

  • software industry promotion agency said Reply

    I know this web page provides quality dependent posts and extra material, is there any other website which presents
    such stuff in quality?

Add a Comment