csvimport icon indicating copy to clipboard operation
csvimport copied to clipboard

Example module for Drupal which imports a CSV file (then does nothing with it)

Results 8 csvimport issues
Sort by recently updated
recently updated
newest added

See https://www.drupal.org/node/2940031

It seems attribute "#required" on a 'file' FormElement leads to a bug that displays a missing file error no matter what... However, we have our convenient custom validator for that...

Accessing lines by their column name ($line['first_name']) is better than accessing it with its position index ($line[0]) IMHO. First, it is safer because if you ever make a mistake with...

I was testing with a csv file of two members to import, so 1 header line and 2 interesting lines. I noticed the @total was displaying 4 instead of 2...

The following line generates a PHP error in watchdogs: `$context['message'] = t('Importing row !c', ['!c' => $context['results']['rows_imported']]);` User error : Invalid placeholder (!c) in string Seems like !placeholder is not...

`$messenger->addMessage(t('Some rows failed to import, but unable to create directory for error CSV at @csv_directory', $targs), 'error');` we cannot use $targs here because it's not in the scope. @csv_directory is...

Hello, Thank you so much for sharing this! This is exactly what I need :) I believe these lines are not necessary: ``` $form['#attributes'] = [ 'enctype' => 'multipart/form-data', ];...