This project is not covered by Drupal’s security advisory policy.
Multivaluefield
Multivaluefield (Multiple values field) is a drupal field plugin, allow to add multiple values on one field.
Drupal 9 ready.
Compatible with feeds.
Examples
Add / Create node programmatically with a "Multivaluefield" field
Example 1.
\Drupal\node\Entity\Node::create(array(
'type' => 'page',
'title' => 'Mvf testing page',
'status' => 1,
'field_mvf' => [
'index' => 'Test index 1',
'0' => "Fields Value 1",
'1' => "Fields Value 2",
],
))->save();
Example 2.
(With $nid = Previously created node ID)
$entity = \Drupal\node\Entity\Node::load($nid);
$values = [
'index' => 'Test index 2',
'0' => "Fields Value 3",
'1' => "Fields Value 4",
];
$entity->set('field_mvf', [$values, $values]);
$entity->save();Similar Projects
- Paragraphs (https://www.drupal.org/project/paragraphs)
- Field collection (https://www.drupal.org/project/field_collection)
Different from the Paragraphs and Field collection
Lite-weight
Store all values in the same field (JSON)
Field configuration is stored on field storage configuration.
No need to create separate configurations
....
Project information
- Project categories: Content editing experience, Developer tools, Site structure
57 sites report using this module
- Created by iwsp on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
8.x-1.0-rc3
released 16 March 2023
Works with Drupal: ^8 || ^9 || ^10
D10 compatibility
Install:
Development version: 8.x-1.x-dev updated 28 Jul 2023 at 15:25 UTC

