The feature you are using here is actually a symptom of a huge security gap - as we patched a security issue in the latest release this functionality was removed - so while you might have used it before, it did leave your site vulnerable.
I'm using the default forms on Umbraco 7.3.7 witch I installed yesterday.
So the bug still exists or Umbraco 7.3.7 installs a old version of forms. But I don't get a update notice..
If you go into the developer section, and open up the package folder. You will see a folder with installed packages, in there you can find the version number.
You should be running Umbraco 4.1.5, where we have removed the option.
Hello Frans
You will need to look at RecordService
A simple example after of getting the Record/Form submission after the form has been submitted would be like so
var record = RecordService.Instance.GetRecordFromTempData(TempData);
RecordService.Instance.Delete(record, record.GetForm());
And an update example
var record = RecordService.Instance.GetRecordFromTempData(TempData);
using (var rs = new RecordStorage())
{
rs.UpdateRecord(record, record.GetForm());
}
I hope this little snippets give you some insight or pointers to get started.
Your var record contains: Umbraco.Forms.Core.Record because you use RecordService.Instance.GetRecordFromTempData(TempData);
Since I'm not looking for the current record but looping through all the records of a form I get: Umbraco.Forms.Mvc.DynamicObjects.DynamicRecord by using Library.GetRecordsFromForm(formGuid)
The DynamicRecord doesn't contain GetForm(). Is it expecting the form Guid or some object?
Hi I am new to umbraco forms. I have the following requirement, We will Implement a Membership and after members login will get access to some of the forms. What I am looking now is does the member is able to edit the data entered using umbraco forms?
After reading this post it looks like once data is submitted members will not be able to edit. Please suggest how to do it with umbraco 7.3 version
For a upcoming project we need the ability to change a form entry. If a site ember has filled in a form on a page he needs to be able to change the entry for that member in the current form.
Hi Antoine,
Yes it is planned to allow the backoffice form entries viewer to edit a submission in the future, however I cannot give you a time frame for this right now.
Yes any workflows would be re-triggered after an edit too at this point in time.
We use umbraco Forms for event signup and often people submit incorrect data and afterwards email us to correct their typo mistakes, which is close to impossible...
Backend form entry editing would be MUCH appriciated, and is actually the only feature we are missing, so hope this get prioritized :-)
Edit forms entry
Is there a way to edit a forms entry?
I have the form Guid and the entry Id. I'd like to render the form with current values prefilled and overwrite them on submit.
If that isn't possible It'd be okay to delete the entry and save the new one.
The documentation on Forms is to basic to find stuff like this...
I've been looking for a solution for a day now. And I'm starting to think there isn't one...
Thanks, Frans
Hi Frans,
The feature you are using here is actually a symptom of a huge security gap - as we patched a security issue in the latest release this functionality was removed - so while you might have used it before, it did leave your site vulnerable.
Have you seen this blog post. https://umbraco.com/follow-us/blog-archive/2016/1/27/umbraco-forms-security-notice/ ?
We are working on an actual supported way to editing form records which are secure.
/Dennis
Hi Dennis,
I'm using the default forms on Umbraco 7.3.7 witch I installed yesterday. So the bug still exists or Umbraco 7.3.7 installs a old version of forms. But I don't get a update notice..
How can I check the forms version?
Frans
I found the version number. I'm using 4.1.5 and this code still works:
Hi Frans,
If you go into the developer section, and open up the package folder. You will see a folder with installed packages, in there you can find the version number.
You should be running Umbraco 4.1.5, where we have removed the option.
/Dennis
See the post above yours. I'm running 4.1.5
Hi Frans,
It´s perfectly fine fetching it that way in code
/Dennis
Ok.
But is there a way to overwrite the record by recordId? Or is this impossible in a partial view/template right now?
Can I delete a record from partial view/template?
I can't find this info in the docs.
Hello Frans
You will need to look at
RecordService
A simple example after of getting the Record/Form submission after the form has been submitted would be like so
And an update example
I hope this little snippets give you some insight or pointers to get started.
Thanks,
Warren
Hi Warren,
Nice snippets. Thanks! Where did you find documentation on the recordservice?
I have to use the records from a Guid and not from tempdata. So I have to look through the documentation, if it's available.
Frans
Hello Frans,
I have recently joined the team at Umbraco to work on Forms, so I am starting to know my way around the code base.
Unfortunately the documentation needs further work and is something on my radar that needs doing.
If you start looking into RecordService & RecordStorage then you should be able to discover what you can do.
As Forms in built on top of Contour some of the same pieces are still applicable
https://our.umbraco.org/projects/umbraco-pro/contour/documentation/
https://our.umbraco.org/documentation/Products/UmbracoForms/
Thanks,
Warren
In your example you're using:
and:
What is it expecting in its arguments?
Your var record contains:
Umbraco.Forms.Core.Record
because you useRecordService.Instance.GetRecordFromTempData(TempData);
Since I'm not looking for the current record but looping through all the records of a form I get:
Umbraco.Forms.Mvc.DynamicObjects.DynamicRecord
by usingLibrary.GetRecordsFromForm(formGuid)
The DynamicRecord doesn't contain
GetForm()
. Is it expecting the form Guid or some object?Thanks
Hi I am new to umbraco forms. I have the following requirement, We will Implement a Membership and after members login will get access to some of the forms. What I am looking now is does the member is able to edit the data entered using umbraco forms?
After reading this post it looks like once data is submitted members will not be able to edit. Please suggest how to do it with umbraco 7.3 version
Is there any news on when it will be possible to edit form data after it has been submitted? This would be very useful.
Thanks!
Hello Dan,
This is currently been worked on this sprint and is aimed for 4.2.2 release and is waiting for internal review
http://issues.umbraco.org/issue/CON-920
Thanks,
Warren
That's great news. Do you have a rough estimate on a date for this?
If we needed to do this urgently is it something we could write using the Forms API?
Thanks
Dan
For a upcoming project we need the ability to change a form entry. If a site ember has filled in a form on a page he needs to be able to change the entry for that member in the current form.
Can someone confirm this is possible now?
Thanks
Twitter conversation on this topic for future reference:
able to change his entry.
and then you use a querystring of ?recordId=GUIDofSubmission
save?
Hello Frans,
This was rectified in this issue here - http://issues.umbraco.org/issue/CON-920
So you need to enable the config setting AllowEditableFormSubmissions and then use the querystring ?recordId=GUIDofRecordSubmission
I hope this helps you.
Thanks,
Warren
Whats not clear for me is how to get the GUIDofRecordSubmission for the current user for the current form?
That still requires looping through the entrys right?
Yes Frans you will need to do some of your own logic to fetch the RecordGUID you want.
Ok, thanks!
Frans
Having the programmatical way to edit is nice. However, is there a way to edit in the backend UI planned in the future?
Also, I'm wondering, if we edit a entry this way, are any of the workflow items triggered?
Hi Antoine,
Yes it is planned to allow the backoffice form entries viewer to edit a submission in the future, however I cannot give you a time frame for this right now.
Yes any workflows would be re-triggered after an edit too at this point in time.
Hope that helps you.
Hi Warren,
We use umbraco Forms for event signup and often people submit incorrect data and afterwards email us to correct their typo mistakes, which is close to impossible...
Backend form entry editing would be MUCH appriciated, and is actually the only feature we are missing, so hope this get prioritized :-)
Thanks in advance!
Hi Horsted,
Yes we are aware that this is currently missing, feel free to go over on the issue tracker and vote the issue up.
http://issues.umbraco.org
Many Thanks,
Warren
Hi Warren,
Thank you for taking the time to reply! I believe this is the issue - http://issues.umbraco.org/issue/CON-786 - and I voted for it!
Thanks, Casper
is working on a reply...