Currently panopoly magic has a limited set of forms that it can change and this set is hardcoded in the module.


| Comment | File | Size | Author |
|---|---|---|---|
| #7 | panopoly_magic-alter-forms-list-2261061-7.patch | 2.36 KB | segovia94 |
| #6 | panopoly_magic-alter-forms-list-2261061-6.patch | 2.44 KB | dsnopek |
| #4 | with-form-added.png | 48.98 KB | segovia94 |
| #4 | without-form-added.png | 36.2 KB | segovia94 |
Comments
Comment #1
hernani commentedComment #2
hernani commentedThe attached patch allows other modules to manipulate the list of forms to be altered.
Comment #3
dsnopekI'm not sure I understand the use case for this. What other forms could you want Panopoly Magic to alter? It's pretty specific to the forms it's meant to work with.
Comment #4
segovia94 commentedThis is actually just what I needed.
I have several custom panel content types which look ugly if they don't have their form added to the list to create a general settings fieldset. Having the ability to add a field gives me better control over my custom module display.
Without the form ID added:

With the form ID added:

The patch worked for me.
Comment #5
dsnopekAha... Ok, that makes sense! Since it's only an additional alter hook and doesn't affect anything else, it should be safe to commit. All we need is some documentation for it in a new panopoly_magic.api.php.
Comment #6
dsnopekOk, here is a new patch that adds panopoly_magic.api.php. Also, I removed the
hook_panopoly_magic_form_ids_to_alter_alter()because I don't think that one actually made sense. The variable it was altering was just for specifying a few extra forms to put a live preview on - all content pane settings forms were already being altered, so I don't think anyone would ever need to add one to the list (but I could be wrong! If you have an example, please let me know).Anyway, check out the attached patch and let me know if this still works for your use case!
Comment #7
segovia94 commentedGreat! #6 works fine.
There is some unneeded whitespace added though.
Here is the patch from #6 with the whitespace line removed.
Comment #8
dsnopekThanks! Committed. :-)