Import CSV from existing old site's form to Sitefinity&#

Posted by Community Admin on 03-Aug-2018 16:00

Import CSV from existing old site's form to Sitefinity's responses

All Replies

Posted by Community Admin on 18-Nov-2013 00:00

I have a CSV file and I don't want to lose all the entries. Is there a way to import that file into a new form I've made? It has all the same fields as my new form.

Posted by Community Admin on 21-Nov-2013 00:00

Hi,

The import of CSV file data into forms is not available with out of the box functionality CSV data can be imported into email campaigns module to create subscribers, here is a screenshot.

I suppose the data must be imported into form as form responces, this can be done using forms module API. Query the data from the CSV and populate the form fields using the sample below.

FormsManager manager = FormsManager.GetManager();
           //get a form by its name each form have sf_ prefix in the name
           var form = manager.GetFormByName("sf_formentriesform");
           //create form entry
           FormEntry entry = manager.CreateFormEntry(form.EntriesTypeName);
           //set value to the form entrues by specifying in which of the custom on the form to add it
           entry.SetValue("FormFileUpload", "valuie");
           entry.SetValue("FormTextBox_C004", "string");
 
           form.FormEntriesSeed = form.FormEntriesSeed + 1L;
           entry.ReferralCode = form.FormEntriesSeed.ToString();
           entry.SubmittedOn = System.DateTime.UtcNow;
           //save
           manager.SaveChanges();

Regards,
Stanislav Velikov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 22-Nov-2013 00:00

How do you get the Import subscribers dialog box?

Posted by Community Admin on 27-Nov-2013 00:00

Hello,

First you need to create a mailing list. For your convenience, I recorded a video showcasing how to get to the import subscribers:http://screencast.com/t/w92x6tp9FK


Regards,
Atanas Valchev
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed