The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
In the past few weeks there has been increasing number of requests by our clients on how to make a custom template for forms notifications. With this blog post we will create one and register it in our project so that we can customize it further as we like.
The first thing you need to do is to create an .htm file in your project which will be our custom template. Then paste the following HTML code in it:
This is the default HTML template which we can now modify as we wish. You can also find it in Sitefinity’s SDK installation folder Content->Resources->WidgetTemplates.zip. For now just add some <p> or <h1> tag with some text, so that after the registration we ensure that we have switched the default template. Then we need to set the Build Action to Embedded Resource as it needs to be resolved from an embedded assembly in the next step.
In order to register your custom template you need to create an .aspx page and use the following code in its Page_Load method:
Now build your solution and run the .aspx page in order to register the custom template. Note that you will need to run this page in the browser each time you make modifications to the template so that the new changes are applied to Sitefinity.
If our email notification settings are correct we should now receive a notification email on form submission with our custom template.
I have also uploaded an archive containing the files from the video here.
I hope you found the blog post useful. Any comments and suggestions are highly appreciated.
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Subscribe to get all the news, info and tutorials you need to build better business apps and sites
You have the right to request deletion of your Personal Information at any time.
You can also ask us not to pass your Personal Information to third parties here: Do Not Sell My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.Learn More