Problem/Motivation
For custom fields with cardinality > 1, we have the option/button to "Add another item". It would be great if we could easily customize this "item" label (e.g. Add another building, add another location, add another member, add another relationship etc.)
I know we have hook_form_alter but having an easy-to-use setting in the Manage form fields would be super helpful. Often an "item" doesn't encompass the correct meaning e.g. when referring to a person. This feature would really enhance the customized feel for the module.
Issue fork custom_field-3508552
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
apmsooner commentedIt really should be a CORE thing... but I can do it pretty easily as I assume it could probably take a long time to get reviewed. I'll put together a patch you can test out.
Comment #4
apmsooner commentedTry the patch. There will be a new field in the field settings form.
Comment #5
chrisckThanks @apmsooner! I’ll test and review as soon as I’m able. That was quick work :)
Comment #6
apmsooner commentedI'm gonna be putting out a new release soon so if you want this feature in, please review sooner than later. If there's any form field mods you want like label, description, etc... just let me know as they are easy alterations. Thanks
Comment #7
chrisckI've tested the MR and I can see the new settings field Add another button label in the field settings. However, after inputting a string and saving the form, the field is cleared. On the node form, the button still shows as "Add another item". Tried clearing cache too.
Comment #8
apmsooner commentedTry the updated patch please. I forgot to add it to the default settings.
Comment #9
chrisckIt is working as expected now. Thank you.
Comment #10
apmsooner commentedMerged!
Comment #12
apmsooner commented