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.
Problem/Motivation
Sometimes admins need to create a fairly similar form
Proposed resolution
Add a clone tab that allows a form to be cloned
Remaining tasks
All
User interface changes
New form for cloning
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#8 | 2716995-clone-forms.3.patch | 10.54 KB | larowlan |
| |||
#8 | interdiff.txt | 1.9 KB | larowlan |
Comments
Comment #2
larowlanComment #3
larowlanComment #4
larowlanAnd a tab
Comment #5
benjy CreditAttribution: benjy at PreviousNext commentedLooks good to me, just one question in the clone submit handler.
When do these get filled in? I'd have thought you'd have a new uuid if you've saved the new $contact_form above?
Comment #6
larowlan#5 correct, they're not filled, will sort
Comment #7
larowlanActually, the field config ones are, the form one isn't
Comment #8
larowlanFixes UUID issue with the form
Comment #10
larowlanComment #11
andypostWhy that incorporated into module?
There should be generic solution a-la bundle_copy module or maybe a part of "entity" module
Comment #12
larowlanbundle_copy isn't getting ported to D8 because it can be done using the config import/export forms in core.
However this isn't something that I'd want exposed to users who're building contact forms (which are those who'd be building webforms on D7).
This gives them a nice UI.
Happy to discuss removing it into a separate module if you feel strongly about it.
Comment #13
jibranI think we can leave it here for now until we'll have a complete solution in entity module.
Comment #14
BerdirI think what you said is exactly why bundle_copy should exist in 8.x :)
Comment #15
andypostFiled #2717909: Create 8.x version of module
Comment #17
RKopacz CreditAttribution: RKopacz commented@larowlan I am looking for an easy way to do in D8 what I was able to do with Bundle Copy: Just export a node bundle and import it into another Drupal site. I'm not sure CMI can accommodate this as easily as Bundle Copy could do it in 7 It seems as though you can only import to a cloned version of the site on which the bundle was created in the first place. Do you know of any documentation on using SMI like Bundle Copy? Because I haven't been able to find it anywhere.
Comment #18
larowlan@RKopacz, see drupal.org/project/entity_clone
Comment #19
RKopacz CreditAttribution: RKopacz commented@larowlan I'm surprised that didn't come up in any of my searches. I'll have a look at that.