Create XForm fields programmatically

Vote:
 

Hi, did somebody had experience with creating fields for xform dynamically?

The user can add polls through the view (not inside edit) so I need to add this to the XForm fields programatically.

This is a part of the solution: 

XFormData data = form.CreateFormData();
data.PageGuid = pageData.PageGuid;
data.SetValue("MyCustomFieldName", "MyValueAsString");
data.ChannelOptions = ChannelOptions.Database;
data.Send();
But I need to add select with options to the XForm.Document somehow. 
Does somebody have a solution for this? I was trying to find the way they do it in UI through dotPeek but haven't succedeed.
Thanks in advance :)
#114355
Dec 10, 2014 16:19
Vote:
 

This link may give you some idea.
http://www.patrickvankleef.com/2014/11/21/episerver-strongly-typed-xforms/

Regards
/K

#114357
Edited, Dec 10, 2014 16:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.