Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
For administrators it can be confusing and more hassle than needed, to create Bookable Unit Type in one form, Unit Description node in another, and reference the Unit Description node in the Bookable Unit Type form.
It is much more user-friendly to have both in one form as the two entities correspond one to one exclusively.
It is fairly simple to combine the two in the Bookable Unit Type form by using Multiple Entity Form.
It does add one more dependency to Multiple Entity Form, but it can be worthwhile "improving" the UX this way.
Please consider it.
Thanks again for this wonderful module.
Comment | File | Size | Author |
---|---|---|---|
#2 | delete_unit_description_when_deleting_rooms_unit_type-2443853-2.patch | 5.42 KB | yalu |
#1 | add_edit_bookable_unit_type_ux-2443853.patch | 6.34 KB | yalu |
Comments
Comment #1
yalu CreditAttribution: yalu commentedHere's a patch to do just that.
Comment #2
yalu CreditAttribution: yalu commentedadditionally delete Unit Description node when corresponding Bookable Unit Type is deleted.
This patch provided introduces two new api.php files for unit_description sub module introducing crud hooks for entities described here https://drupal.org/node/999938. Only the delete hook is necessary for the functionality to work - but other hooks are there, as they can be nice to have around.
Thanks!
Comment #3
yalu CreditAttribution: yalu commentedI did consider contributing an add-on module separately by using hook_form_alter but for some reason multiple_entity_form does not work using that hook.