diff --git a/salsa_advocacy/salsa_advocacy.module b/salsa_advocacy/salsa_advocacy.module index 5a15f64..07ef79b 100644 --- a/salsa_advocacy/salsa_advocacy.module +++ b/salsa_advocacy/salsa_advocacy.module @@ -1092,14 +1092,14 @@ function salsa_advocacy_fetch_action_targets($action_key) { * A form array set for theming by theme_salsa_advocacy_settings_form() */ function salsa_advocacy_settings_form($form, &$form_state) { - $form['progress'] = array( - '#type' => 'fieldset', - '#title' => t('Progress bar'), - ); - // Custom fields used as goal for progress bars on action forms. $custom_fields = salsa_entity_custom_fields('action'); if (!empty($custom_fields)) { + $form['progress'] = array( + '#type' => 'fieldset', + '#title' => t('Progress bar'), + ); + foreach ($custom_fields as $field_name => $field) { $options[$field_name] = $field['label']; }