Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • saintwright 69 posts 77 karma points
    Dec 15, 2010 @ 03:43
    saintwright
    0

    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

    Dec 15, 2010 @ 08:41

    Hi,

    An easy way is to set a cookie, for some details check this post: http://www.nibble.be/?p=81

     

  • saintwright 69 posts 77 karma points
    Dec 15, 2010 @ 09:22
    saintwright
    0

    Thanks - but how do I go about hooking into the Contour event model?

  • Comment author was deleted

    Dec 15, 2010 @ 09:34

    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)

  • saintwright 69 posts 77 karma points
    Dec 15, 2010 @ 10:41
    saintwright
    0

    excuse my ignorance but how does the SetCookieOnSubmit get called after the form is submitted?

    SetCookieOnSubmit
  • keilo 568 posts 1023 karma points
    Sep 10, 2015 @ 17:51
    keilo
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft