Yeah just feed it the record id :) are you using the razor macro then simply append ?recordGuid=anid to the query string and you should see the macro in edit mode :)
var AllEntries = Umbraco.Forms.Mvc.DynamicObjects.Library.GetRecordsFromForm("Big Fat Form Id - Guid");
var myKey = Membership.GetUser().ProviderUserKey.ToString();
var entries = AllEntries.Items.Where(i => i.MemberKey.ToString() == myKey).ToList();
Edit existing post
Is there any simple way to load an existing record / form by it's record id (user should be able to edit his posts)
Have seen some topics about this, but not any solutions.
/Jonas
Comment author was deleted
Yeah just feed it the record id :) are you using the razor macro then simply append ?recordGuid=anid to the query string and you should see the macro in edit mode :)
Tim what about for the new Umbraco Forms? I've been trying to feed it with the recordGuid, however, it does not seem to work.
I am using 7.3 and 4.1.4
UPDATE: I actually managed to do it by adding recordid instead of recordGuid!
Scott how did you get it to work with Record id i have tried both but neither are working for me?
Tim i'm using 7.10 umbraco and 7.0.1 umbraco forms and can't seem to populate my form with a record using ?recordId or recordGuid, any ideas?
Hi Dale
I did like this:
EditUmbracoForm
I have edited my example so maybe it needs tweaking, I haven't tested it but it is taken from a working code.
Don't know if you can use it, if not let med know, maybe you can show us what you have done to be able to assist you.
Dale did you get it to work?
Comment author was deleted
And to get the records from a certain member
var AllEntries = Umbraco.Forms.Mvc.DynamicObjects.Library.GetRecordsFromForm("Big Fat Form Id - Guid"); var myKey = Membership.GetUser().ProviderUserKey.ToString(); var entries = AllEntries.Items.Where(i => i.MemberKey.ToString() == myKey).ToList();
@foreach (var record in entries) {
}
Great!, that worked!
is working on a reply...