Steps for using the local repository to store “Contact Us” data.
I use the “Blue Smoothie” theme from sites.kooboo.com which has a Contact Us form. It simply display an alert message on the screen when you click Submit. The follow should work with any form but if you would like to follow along install the “Blue Smoothie” template and create a new site.
Open the view with the Contact Us form, which in Blue Smoothie is Main.Contact. Add the highlighted ‘action=…’ to the <form… element. You will also need to add the @Html.AntiForgeryToken() inside the form, as shown below.
There is also a popup message I want to hide so I’ll just comment out the alert. You could remove the entire function since it serves no purpose.
Create a ContentType.
- Create a Content folder for the newly created ContentType
Create a Submission setting for Posting to the newly created Folder.
The form now posts data to the ContactUs repository. Leave a comment if you found this helpful. Thanks.