How to Skip Saving One Field on Form Submission

Siavash Mortazavi asked on July 17, 2018 15:11

Hi, I am using biz form to collect some data from users, and I have an extra hidden form field to send a generated svg text to the server. I need the svg text to be processed on the server (which I already can do successfully), but then I don't need to save it to the form table in the database, all other fields should be saved though.

Currently I'm using the "BizFormItemEvents.Insert.After" to process the svg, but how can I skip saving this particular field to the database? Is it possible to do it in a "BizFormItemEvents.Insert.Before" event handler? Can you please show me how?

Thanks! :-)

Correct Answer

Trevor Fayas answered on July 17, 2018 21:29

I think you already have your solution! Use the BizFormItemEvents.Insert.Before, and from there you should be able to grab your e.Item.GetValue("MySVGField") and processes it, then simply set it to empty afterwards (e.Item.SetValue("MySVGField", null))

If you are looking to be able to send/processes this without even having the database table, that may get a little trickier. Fields without Database representation don't make it to the event logs, you would need to potentially us a Field Without Database representation and use a custom Online Form Control so you could Validate the form, get the SVG value from the control, then submit the form, and processes your SVG after in the webpart code.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Siavash Mortazavi answered on July 17, 2018 22:11

Thank you Trevor, I had thought I might be able to simply clear the value for the field, but I was not sure if setting it to null is going to be just for the scope of the event handler block or it will be saved like that to the database too. Thanks again! :-)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.