Copied to clipboard

Flag this post as spam?

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


  • Edwin Stoffels 5 posts 25 karma points
    Jul 22, 2016 @ 11:58
    Edwin Stoffels
    0

    Contour: GetRecordsFromForm and UmbracoPageId alwasy returns 0

    I'm using the function GetRecordsFromForm, but UmbracoPageId always returns 0.

    Can't find similair cases, anyone a solution?

    code snipplet

    foreach (dynamic record in Library
                      .GetRecordsFromForm("78164dcc-3aa6-4f72-8f0a-0710f6e886ff").Items.OrderByDescending(rec => rec.Created).Take(50))
            {
    
            <li>
                <div class="reactieName">
    
    
                    <div>@record.Naam (gast)  op @record.Created.ToString("dd MMMM yyy HH:mm")</div>
    
    
            <div> op pagina @record.UmbracoPageId</div> 
    
                </div>
                <div class="reactieText">
                    <div class="reactieTextValue">
                    @record.Reactie
                    </div>
                </div>
                </li>
        }`
    
  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Aug 02, 2016 @ 20:31
    Dennis Aaen
    0

    Hi Edwin,

    When I try out your code I get the id of the Umbraco page where the form has been submitted on.

     <div>@record.UmbracoPageId</div> 
    

    The above code will give me the id of the page where the form was submitted. The ID could be something like e.g 1060.

    Best,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft