Closed (fixed)
Project:
Panels
Version:
7.x-3.x-dev
Component:
Plugins - content types
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2013 at 16:08 UTC
Updated:
31 Jan 2013 at 17:50 UTC
On one of our client sites, we wanted to be able to have the user pick a given content type, and if that content type is in some in-code list, then the settings form would not be displayed and would just use the default value.
Is there a sane way to accomplish this outside of hacking panels? If not, is this something that could possibly be included? I think that this could be very useful to sites where end-users have access to edit panels pages.
Comments
Comment #1
merlinofchaos commentedI believe you can use the alter hook on content types to tell it the 'add form' for that content type is NULL, and set the 'defaults' the way you want them. Make sure the 'edit form' still exists.
You want to take advantage of this alter:
See ctools_content_form() for how the forms are constructed. At a glance it looks like it might be hard to have an 'edit form' with no 'add form', so a small patch might be required.
Comment #2
cweagansThanks!!