I am trying to display approved records only on my website but when I use the method GetApprovedRecordsFromFormOnPage i am getting submitted forms displaying also. How do I get just the approved records to display?
Here is my code:
@inherits umbraco.MacroEngines.DynamicNodeContext
@using Umbraco.Forms.Mvc.DynamicObjects
@{ var approvedRecords = Umbraco.Forms.Mvc.DynamicObjects.Library.GetApprovedRecordsFromFormOnPage(Model.Content.Parent.Id, "ae9fe8e9-033c-4fb8-89ec-db0a62dbce43");
GetApprovedRecordsFromFormOnPage is returning submitted and approved records Help!
I am trying to display approved records only on my website but when I use the method GetApprovedRecordsFromFormOnPage i am getting submitted forms displaying also. How do I get just the approved records to display?
Here is my code:
@inherits umbraco.MacroEngines.DynamicNodeContext
@using Umbraco.Forms.Mvc.DynamicObjects
@{ var approvedRecords = Umbraco.Forms.Mvc.DynamicObjects.Library.GetApprovedRecordsFromFormOnPage(Model.Content.Parent.Id, "ae9fe8e9-033c-4fb8-89ec-db0a62dbce43");
<ul>
@foreach( var record in approvedRecords ) {
<li> <em>@record.Created.ToString("dd MMMM yyy")</em>
the record id is @record.Id
@foreach( var field in record.RecordFields ) {
// First, build table rows for non-editable fields
var sThisField = field.Value.Field.Caption;
var sThisValue = field.Value.ValuesAsString();
<p>@sThisField - @sThisValue</p>
}
</li>
}
</ul>
}
Hi JME,
I have the same issue! I posted in here 7 days ago, still no replies and i'm getting desperate. Maybe admin is on holiday....
GetApprovedRecordsFromPage-not-working
Hi Kerri,
That does not give me confidence that we will get an answer. I need this working by tomorrow!
Comment author was deleted
it's a bug that will get fixed next week, but I posted a workaround here http://our.umbraco.org/forum/umbraco-pro/contour/57089-GetApprovedRecordsFromPage-not-working
THANK YOU SO MUCH!
is working on a reply...