Problem/Motivation
Upon creating a Contact, it takes 4 steps to get to a contact add form: Content -> CRM -> Add contact -> (select bundle).
Creating contact after contact will be a common scenario that we should optimize for.
Proposed resolution
Add two (secondary) buttons:
- "Save and add another [Type]" -> /crm/contact/add/[type]
- "Save and add another Contact" -> /crm/contact/add
This reduces the steps to a contact add form down to 1-2.
Original report
Problem/Motivation
Right now in order to create multiple contacts, I have to click out to the Admin Content menu, then the CRM tab, and then the Add Contact button, and then the kind of contact you want each time. This quickly gets pretty annoying, and is something the typical end user will have to do a lot.
Proposed resolution
Change the Status Message that pops up after you create a contact to include links to add the different kinds of contacts
Issue fork crm-3542318
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
speckles commentedComment #3
jdleonardI feel like the status message could get overwhelming if it includes links for each Contact Type.
What if we added two buttons to the Contact add form?
Comment #5
jdleonardCreated a draft MR to add those buttons. Both buttons were working for me, but now only one of them is and I can't figure out why. Could use some fresh eyes!
Comment #6
bluegeek9 commentedMaybe this should be the same as add Taxonomy term form:
'Save' and 'Save and goto list'.
Comment #8
jdleonardI like the idea of following an existing pattern. However, a key difference here with adding a taxonomy term is that from the list of taxonomy terms, there is one button to get back to the term add form whereas for contacts, the button takes you to `/crm/contact/add`, which then requires you to make another selection (a bundle).
I agree with @speckles that creating contact after contact will be a common pattern and is worth optimizing for. The two additional buttons optimize for the sub-scenarios of 1) creating another Contact of the same type; and 2) creating another Contact of a different type.
Sub-scenario 2 could perhaps be eliminated if the contact add form were to provide a way to create an associated contact e.g. while creating a Person, create an Organization with a corresponding Relationship (I would think that creating a related Contact would be the most common cause of sub-scenario 2), but there's much more complexity there so I'd propose deferring consideration of that.
Changing IS and title to reflect my proposed solution (but seeking input from @speckles too).
Comment #9
speckles commentedChanges suggested make sense to me
Comment #10
jdleonardThis is now working. Maddeningly time consuming to figure out what the problem was. Placeholder variable needed to start with @ rather than % so as to not introduce HTML into the button label, which was silently causing a no-op.
Comment #11
bluegeek9 commentedTaxonomy only has two buttons. The second is conditional.
We could do something similar, 'Save and go to contact'
It might make sense to only add the option when adding a new contact.
When updating a contact the form will redirect to the entity.crm_contact.canonical
When creating a new contact the form returns the form to add a new contact.
Comment #12
jdleonardGood suggestions.
Made "Save and add another" buttons only visible when adding a contact and only if no destination specified.
Changed default button label to "Save and go to contact" when no destination specified.
Lowercased bundle labels for the buttons.
I think adding both "Save and add another" buttons makes sense to support the data entry scenario of someone adding an Organization then adding one or more Persons who are associated with that Organization then repeating for another Organization. I think the extra screen real estate is a worthwhile tradeoff.
Comment #13
bluegeek9 commented