Question

I have a content type that contains a couple of required fields that do not have a mapping counterpart in the csv feed. When I import the csv feed, the process fails because of the required fields. What plugin can I use in a custom module to 'finish' the import by providing the values for the other fields? Is this even possible?

Était-ce utile?

La solution

You can use the Feeds Tamper plugin "Set value or default value".

  1. Install the modules Tamper and Feeds Tamper.
  2. Go to the mapping page.
  3. Select a target that you want to set a default value for.
  4. On the source selector that appears, select "New CSV source". Type in a source name that does not appear in your CSV file.
  5. Repeat step 2 and 3 for every field you want to set a default value for and save the mappings.
  6. Go to the 'Tamper' page.
  7. For each target you want to set a default value for, click on "Add plugin". From the selector that appears, select "Set value or default value".
  8. A field called "Value" appears. Fill in the default value and click "Submit".
Licencié sous: CC-BY-SA avec attribution
Non affilié à drupal.stackexchange
scroll top