Copied to clipboard

Flag this post as spam?

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


  • Jeremy 14 posts 35 karma points
    Dec 11, 2009 @ 21:46
    Jeremy
    0

    Disable saving of form entries

    I have created a form that holds sensitive information.  I would like to disable the saving of entries for this particular form.  I have not seen any way of disabling the feature.  Is there a way to do this?

     

    Thanks

  • Jeremy 14 posts 35 karma points
    Dec 12, 2009 @ 00:37
    Jeremy
    0

    Ok, I changed the StoreRecordsLocally field in the UFForms table to false in the database.  This hides the data in the UI, but the data still gets written to the database.  I'm half way there.  Anybody know how to prevent the data from being written to the database?

     

    Thanks

  • Per Ploug 865 posts 3491 karma points MVP admin
    Dec 14, 2009 @ 11:18
    Per Ploug
    0

    There is a complete event model for the records, so as soon as the record has been approved (or submitted) you can delete it from the database, by subscribing to the Recordapproved event: 

    Umbraco.Forms.Core.Services.RecordService.RecordApproved += new EventHandler<RecordEventArgs>(RecordService_RecordApproved);

     

    void RecordService_RecordApproved(object sender, RecordEventArgs e)

            {

                RecordService rs = new RecordService(e.Record);

                rs.Delete();

                rs.Dispose();

            }

     

  • Jeremy 14 posts 35 karma points
    Dec 14, 2009 @ 20:50
    Jeremy
    0

    Thanks for the response Per.

     

    Is there a way to stop the record from being inserted into the database?  If not, is there a way to alter the data before it gets inserted?  One of the fields in my form contains credit card information, and I cannot insert this into the database as plain text.  At the very least, it has to be masked before it gets inserted.  Maybe Contour isn't the best choice for this particular form.  What do you think?

     

    Thanks

  • Per Ploug 865 posts 3491 karma points MVP admin
    Dec 15, 2009 @ 09:58
    Per Ploug
    0

    Hmm, nope. The current process when handling each step will make contour save the form before doing exceuting any events, so no matter what the value will end up in the database. Contour does this to ensure the step between steps are kept and that the workflows process the actually submitted data.

    So the events are currently not an option. Will look into how we can improve this model.

    A solution could be to create a new fieldtype, a textbox that returns the entered value encrypted, if you want the sourcecode for the current textbox fieldtype, write me an email at: pph at umbraco.dk

     

  • Jeremy 14 posts 35 karma points
    Dec 15, 2009 @ 19:48
    Jeremy
    0

    Thanks Per.  I created a custom fieldtype that will simply return a masked value ("xxxxxxxxxxxxxxxx").  This was super simple.  Thanks for the tip.

  • Tobias Lopez 64 posts 210 karma points
    Aug 23, 2013 @ 10:13
    Tobias Lopez
    0

    Is it possible with the version 3.0?

Please Sign in or register to post replies

Write your reply to:

Draft