This is such a great module that I think does not get the attention is deserves. Without it the workflow for most Drupal Commerce sites is almost unusable. Besides multiple Commerce sites I use it on many other sites too now to allow users/admins to easily select existing entities of all types. A big thank you to the developers.
I do have a feature request for an item that has come up many times in my sites. When creating an Inline Entity Form field I would love to have a setting option to "Prevent adding of new nodes". I know the Add New Node button is not there if the user doesn't have the privilege to add entities of that content type but often we want them to be able to still add the content through the content's on interface but not through the IEF's widget.
Adding an option to disable it would allow greater flexibility in how IEF can be used, cleanup the IEF widget, and prevent mistakes in the user workflow.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2056139-prevent-add-new-2.patch | 2.64 KB | joelpittet |
#1 | inline-entity-form_add_new_option.patch | 2.93 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI made a patch, which defines a new checkbox in the field-settings.
So now you can select for each field if you want to allow creating new nodes.
Comment #2
joelpittetThanks for the patch @svenssson though it was not relative to the project.
Here's some details: https://drupal.org/patch/
I find it easiest to take the git repo down directly and and do the changes there, but I believe you can do
git diff --relative
To avoid patches starting from the webroot.Also for a patching workflow that may be easier to follow: @see http://pittet.ca/drupal/sprint/patch
Anyways, thanks again and here's the re-roll from a relative path. And bumping up to dev because that's what I patched against.
Comment #3
joelpittetMinor title change
Comment #4
joachim CreditAttribution: joachim commented> I know the Add New Node button is not there if the user doesn't have the privilege to add entities of that content type
Off-topic, but I am not finding this to be the case! Users without the permission to add the referenced node type can still create one from inside the IEF: filed #2354169: doesn't respect 'create' permission for referenced entities.
Comment #5
lucyp CreditAttribution: lucyp commentedThanks for these patches. This works great for me, really useful. I hope it gets integrated into next version.
Comment #6
zuernBernhard CreditAttribution: zuernBernhard commentedThis patch works flawlessly and exactly solves the problem +1 !
Please commit it to the project.
Comment #7
bojanz CreditAttribution: bojanz commentedCommitted, thanks.