Hi,

I'm not sure whether to file this as a support-request or a feature-request. Basically I am creating a panel pane that needs no configuration, however, as far as I can tell, I still need to pass it a 'edit form' parameter. I have the following:

function cis_con_con_pre_status_ctools_content_types() {
  return array(
    'title' => t('Pre-Consultation Status Controller'),
    'description' => t('Controls the status updates for pre-consultation'),
    'single' => TRUE,
    'content_types' => array('con_pre_status'),
    'render callback' => 'cis_con_pre_status_render',
    'edit form' => 'cis_con_pre_status_edit_form',
    'defaults' => array(),
    'category' => array(t('CIS'), -9),
  );
}

// This panel needs no config
function cis_con_pre_status_edit_form(&$form, &$form_state) {
  return $form;
}


// This panel needs no config
function cis_con_pre_status_edit_form_submit(&$form, &$form_state) {

}

Is there anyway to not bother with those empty config form items? I tried just removing the 'edit form' property from the array, but that appears to break things.

Comments

sdboyer’s picture

Assigned: Unassigned » sdboyer
Category: support » bug

Hmm, it used to be optional (prior to the migration to ctools). I'll have a look.

merlinofchaos’s picture

It wasn't optional prior to CTools actually. It should now be optional *if* you disallow title override *and* you do not require contexts. If you do not specify an edit form and leave the function out, I believe that it should work.

sdboyer’s picture

Status: Active » Postponed (maintainer needs more info)

Really? I have this specific memory of rewriting that portion to make it optional - only if the edit form function was specified does it get called, otherwise it just bypasses. Maybe I made it up...

@phayes - try merlin's suggestion, let us know if that takes care of it.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Suggestion made, no updates for more than 30 days.