Copied to clipboard

Flag this post as spam?

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


  • Ansar 181 posts 291 karma points
    Apr 21, 2015 @ 10:09
    Ansar
    0

    Umbraco Forms - How to sort records.RecordFields as it appears in the frontend

    Here is the code we have for sending custom formatted email when submittig a form. 

    var guidL = new Guid(recordid);
    
    RecordStorage rs = new RecordStorage();
    
    var records = rs.GetRecordByUniqueId(guidL);
    
    foreach(var field in records.RecordFields  )
    {
        //make email body
    }
    
    //send email

    We can not find a way to sort the fields as it appears in the frontend form - there is no recordindex or sortorder. 

    The fields appears properly sorted when using the builtin workflow - Send Email. 

    Plaese help

  • Alex Skrypnyk 6054 posts 23213 karma points MVP 5x admin c-trib
    Apr 24, 2015 @ 23:00
    Alex Skrypnyk
    0

    Hi Anz,

    I know it's ugly solution, but you can save your row index in the hidden fields on the frontend, and then use this numbers for sorting in backend.

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft