Two submit buttons in Sitecore WFFM

We recently ran into an interesting challenge where the user wanted two submit buttons on their wffm form, the value of which then needed logging in the WFFM database. Note this approach does rely on javascript.

WFFM gives you the ability to setup custom fields (see Sitecore docs). I based this implementation on section 3.7.3

In your solution setup a custom ascx:

and then the code behind:

You then need to create the custom field within Sitecore. This wants to live in ‘/sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/Custom’. The only field you need to set is the UserControl field. In my example this was /forms/customformitem.ascx.

When you setup your form you can then select:
select the type

In the front end this looks like:
form

And finally, when you submit you get:
report

Sorry mr a@b.com!, you might receive a few test signups 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *