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 2655 karma points 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?

    :)

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Oct 26, 2010 @ 08:00
    Tim Geyssens
    0

    Hi Tim,

     

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

  • Tim 1193 posts 2655 karma points c-trib
    Oct 27, 2010 @ 15:39
    Tim
    0

    Spot on, thanks!

    :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies