Copied to clipboard

Flag this post as spam?

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


  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Oct 22, 2010 @ 16:41
    Tim
    0

    Get Field XML Name

    Bit of an odd one, but I'd like to loop through the current fields for a form, and get the xml node name for the values of that field.

    So if the field's caption was "friend's name" the xml node name is "friendsname".

    Is there an api call or function that I can use to get the node name? I can loop through the fields using the recordService quite happily, but I'm struggling to get the normalised field caption for the node name! Any pointers on where the function is for this?

    :)

  • Comment author was deleted

    Oct 26, 2010 @ 08:00

    Hi Tim,

     

    Try, Umbraco.Forms.Data.XmlHelper.XmlName(string caption)

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Oct 27, 2010 @ 15:39
    Tim
    0

    Spot on, thanks!

    :)

Please Sign in or register to post replies

Write your reply to:

Draft