Try our conversational search powered by Generative AI!

EPiServer Forms

Vote:
 

Hi all,

I am just looking at the new EPiServer Forms add-in.  It looks great and I'm looking forward to implementing it in the near future.

A quick question though - we have clients that are currently using Xforms. 

What would be the recommended approach of converting Xforms to Forms and merging/retaining data already stored?  Is this even possible?

Thanks in advance.

Adam

#142252
Dec 07, 2015 15:30
Vote:
 

Unfortunately there is no built in support to convert from XForms to Forms since the data structure is very different.

It could be made for an individual project but since the usages of XForms can be so different between projects and Episerver parners I wouldn't hope for a generic solution.

#142259
Dec 07, 2015 21:45
Vote:
 

Hi Alf,

Thank you for your reply. 

In terms of doing this for an individual project, have you any examples of how you would accomplish this?

Thanks

Adam

#142268
Dec 08, 2015 10:17
Vote:
 

Since the forms in Episerver Forms are typically Content, you'd need to map the different fields in your XForms to which element block you want to use instead.

Iterate through each XForm and create the XForm content + elements. Add the elements to the Form container block's ContentArea.

For the layout I'd suggest that you use Tags to get specific layout options, for example width of an element.

Also iterate through the XForm Data and save it into Episerver Forms format using ServiceLocator.Current.GetInstance<PermanentStorage>();

Take a look at the method GetSubmissionData in EPiServer.Forms.Controllers.DataSubmitController how to populate the submitted data that are stored using PermanentStorage.

I hope this gives you some clues where to start?

#142272
Dec 08, 2015 10:55
Vote:
 

Great thanks Alf.

Have you any information on how to customize the rendering of Forms?  I havent seen much on the user guide page apart from how to use Forms from an editorial point of view.

Thanks

Adam

#142298
Dec 08, 2015 16:33
Vote:
 

As you've probably seen, the elements are simply blocks that are added to a ContentArea on the Form Container Block.

Using DisplayOptions (http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/9/Rendering/display-options2/) you can set for example "half width" and create views for the element block that contains whatever necessary to set a half width form element.

From this point of view "It's only content" so you wouldn't need to worry too much.

Looking at "Rendering" in the documentation will probably give you some help. http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/9/Rendering/Rendering/

#142303
Dec 08, 2015 16:55
* 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.