I have a site that will contain several forms that may have a lot of fields, and there are several forms that have the same fields. Is it possible to create a form or add new form elements to an existing for programatically? It would help to be able to write code to generate all the forms rather than manually create each one, which would be tedious. It would also help so that I could run the same process to create the same forms on different databases/environments.
A few more thoughts on this. I realize that I can create a base form that includes the common fields, then copy and paste to create several forms. However, this doesn't help deploy forms between environments. In the Episerver Admin, I can select the forms in the Admin -> Tools -> Export Data, export to a file then in theory import the forms in the target environment. Has any one tried exporting/importing forms?
Forms use Block concept, and inherits everything from Block, both FormContainer and FormElements are Blocks.
Yes, you can export/import to replicate your content (Block, Form).
There is critical bug when export/import forms in version 4.4.4. You should wait Forms 4.5 to make sure it's safe.
Thanks for the info. I was able to write code to programatically create a form from scratch so I have what I need. It would help to be able to use export/import to move forms though. Thanks for the heads up on the issue with 4.4.4.
FYI Forms 4.5 was released on April 17, 2016 - see http://world.episerver.com/documentation/Release-Notes/?versionFilter=4.5.0&packageFilter=EPiServer.Forms&typeFilter=All.
Thank you Bob,
Importing content bug AFORM-1031 is fixed in 4.5