- Issue created by @giuse69
- Status changed to Closed: works as designed
almost 2 years ago 4:36pm 31 October 2023 - ๐บ๐ธUnited States apmsooner
The field settings with cardinality set to limit functions as other Drupal core fields with similar cardinality settings. If for example you set limit to 3 and you are asking to not show 3 blank sets of values, I don't think the fix for that is appropriate here but rather in Core for ALL field types. I think this contrib module may help with that: https://www.drupal.org/project/sam โ and there is an issue that addresses it in Core here: https://www.drupal.org/project/drupal/issues/1156338 โจ Fixed maximum number of field values, but use ยซadd moreยป similar to when cardinality ยซunlimitedยป is used Needs work . I'm going to mark this as closed in favor of the solutions there and hopefully will accommodate your request. Feel free to reopen if there is incompatible with one of those solutions specific to this field but I would assume if it works for other field types, it should work for this one. Thank you for using the module and requesting this feature, I do see the merit for it.
- ๐บ๐ธUnited States apmsooner
That sam module isn't compatible out of the box but seems it can be by providing a hook to alter fields allowed: https://www.drupal.org/project/sam/issues/3318973 โ . You might try this to get it to work. I don't think I would support in the module by default otherwise since the more permanent goal in CORE support would eventually resolve. Best of luck.
- ๐บ๐ธUnited States apmsooner
If you want to use the sam module, Using this hook in your own module should work. These are the widgets custom_field provides.
function MY_MODULE_sam_allowed_widget_types_alter(array &$widget_types) { $widget_types[] = 'custom_stacked'; $widget_types[] = 'custom_flex'; }
- Status changed to Active
25 days ago 5:02pm 30 July 2025 - ๐บ๐ธUnited States andy-blum Ohio, USA
Reopening this per discussion with the maintainer: https://drupal.slack.com/archives/C09312M6Y4A/p1753894317586489
PR coming soon.
- ๐บ๐ธUnited States andy-blum Ohio, USA
andy-blum โ changed the visibility of the branch 3397867-add-values-button to hidden.
-
apmsooner โ
committed b61058ec on 3.1.x authored by
andy-blum โ
Issue #3397867 by andy-blum, apmsooner: Add values button
-
apmsooner โ
committed b61058ec on 3.1.x authored by
andy-blum โ
-
apmsooner โ
committed b61058ec on 4.0.x authored by
andy-blum โ
Issue #3397867 by andy-blum, apmsooner: Add values button
-
apmsooner โ
committed b61058ec on 4.0.x authored by
andy-blum โ