I have two drupal sites with exactly same entity forms, I would like to import entityform submissions from site A to entityform submissions site B.

I had a look into feed modules which works very well to import node but there is no option for to import data into entityform.

  • You can write a custom module, read from csv file and create new form submissions programmatically. – Tejas Vaidya Jun 13 '16 at 13:09
  • Have a look at the Data export import module – Krishna Mohan Jun 14 '16 at 10:46

There doesn't seem to be any contributed module available for importing Entityform submissions from CSV.

You can simply try creating a small module which read CSV data and import Entityform submissions. To do this you can simply write a batch operation using Batch API and create Entityform Submissions using code snippet available here.

Another way could be to try Bundle Copy module that works with major entity in Drupal Core and also provide simple API for new/custom Entities. I've not tried Bundle Copy with Entities other than Node. You can try if this works with Entityform if not you can use its API and extend it.


use Entity Reference Feeds and Feed Entity Processor

> Use case

How this module works is perhaps more easily conveyed through a simple example:

Lets say we are importing products, together with product-reviews as XML from a third pary API. This happens to be an ill-designed API, and the reviews are nested in the XML as children of the products they belong to, and cannot be fetched separately.

There are multiple solutions to this problem. One could for example create an API wrapper, preprocessing the file and separate products and reviews in two xml-feeds. This is a bit of work though, comes with additional issues like making sure reviews are imported before products etc.

Entity reference feeds provides a "quick and dirty" solution. After creating an entity reference to product reviews in the product bundle, fields and properties of product reviews will be available as mapping targets in the mapping settings of the product importer. Products and reviews will now both be imported in the same run, product reviews created "in place" as values of the entity reference field.

and if you'll try it by yourself I suggest custom feed mapper instead your CSV parser.how use custom field mapper feeds

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.