Stop a contour survey being completed a second time
Sorry if this has been asked before but i could not seem to see the answer. How do I display an alternate page if the user has completed the a contour form previously??
Well if you download the code from that post and simply place the .dll in your bin folder that should do it... (then you'll just need to update your template like it outlines in the post)
This is an old post, but stumpled when i was looking for the same.
If you create a .cshtml file under App_Code with
using System;
using Umbraco.Forms.Core.Services;
namespace Contour.Addons.ScoreCalclulator
{
public class SetCookieOnSubmit: umbraco.BusinessLogic.ApplicationBase {
public SetCookieOnSubmit()
{
RecordService.RecordSubmitted +=
new EventHandler
All credit for the code goes to Tim.
This will create a cookie with the recordId with value set to 1
In the template/page, one can check for this cookie and show/hide the form.
Stop a contour survey being completed a second time
Sorry if this has been asked before but i could not seem to see the answer. How do I display an alternate page if the user has completed the a contour form previously??
Comment author was deleted
Hi,
An easy way is to set a cookie, for some details check this post: http://www.nibble.be/?p=81
Thanks - but how do I go about hooking into the Contour event model?
Comment author was deleted
Well if you download the code from that post and simply place the .dll in your bin folder that should do it... (then you'll just need to update your template like it outlines in the post)
excuse my ignorance but how does the SetCookieOnSubmit get called after the form is submitted?
This is an old post, but stumpled when i was looking for the same.
If you create a .cshtml file under App_Code with
All credit for the code goes to Tim. This will create a cookie with the recordId with value set to 1
In the template/page, one can check for this cookie and show/hide the form.
is working on a reply...