Copied to clipboard

Flag this post as spam?

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


  • JME 14 posts 61 karma points
    Oct 08, 2014 @ 23:08
    JME
    0

    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> 

     }

  • Kerri Mallinson 113 posts 497 karma points
    Oct 09, 2014 @ 10:07
    Kerri Mallinson
    0

    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

  • JME 14 posts 61 karma points
    Oct 09, 2014 @ 14:00
    JME
    0

    Hi Kerri,

    That does not give me confidence that we will get an answer.  I need this working by tomorrow!

  • Comment author was deleted

    Oct 10, 2014 @ 08:49

    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

  • JME 14 posts 61 karma points
    Oct 10, 2014 @ 16:08
    JME
    0

    THANK YOU SO MUCH!  

Please Sign in or register to post replies

Write your reply to:

Draft