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?
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
Hi Tim,
Try, Umbraco.Forms.Data.XmlHelper.XmlName(string caption)
Spot on, thanks!
:)
is working on a reply...