I wish the ability to move ToDo-fields and the ability to hide some of the fields.
I have different events with a set of ToDos. I have added some other fields to the form, eg. "Event Titel".
Together with the module "Node form columns" I can move the cck-fields. But I can't move the fields to the top of the form. I will always have the ToDo-fields in top and the "Event Titel" below. Some other core-fields can be moved, but not the ToDo-fields.
And I need to hide some of the ToDo-field, if I make costom-fields to replace the core-values.

CommentFileSizeAuthor
#2 ToDo-form.pdf178.47 KBuv516

Comments

AlexisWilke’s picture

Assigned: Unassigned » AlexisWilke

In regard to placement with the CCK system, try adding the following code at the end of your to_do/to_do.module file and let me know whether that works for you:

/**
 * Add the To Do fieldset to the CCK.
 */
function to_do_content_extra_fields($type_name) {
  $extra = array();

  $extra['to_do'] = array(
    'label' => t('To Do'),
    'description' => t('To Do module form.'),
    'weight' => 0,
  );

  return $extra;
}

In regard to showing more or less data, you'll have to tweak the templates. See inside this folder:

to_do/templates/

You'll just have to delete what you don't want to see.

Thank you.
Alexis Wilke

uv516’s picture

StatusFileSize
new178.47 KB

Thanks.
Now I can move the fields in the vindow "Handle fields", but when I look at the node afterwards, the ToDo-fields is still at the top. The movement doesn't work. (Look at the attached pdf)

AlexisWilke’s picture

Ah! I guess we need to use the exact name of the field instead... which is "to_do_fieldset".

In the previous code sample, in the [...], add _fieldset and let me know whether that works for you!

  $extra['to_do_fieldset'] = array(
    'label' => t('To Do'),
    'description' => t('To Do module form.'),
    'weight' => 0,
  );

Thank you.
Alexis

uv516’s picture

My first issue is fixed by #3. - Thanks.

My second issue (hiding some fields) cannot be resolved as Alexis wrote in #1 ("You'll just have to delete what you don't want to see"), because I want to use the fields and then "re-design" them by creating computed fields containing alternative formats for the results. If I delete something, I can't use the values.

AlexisWilke’s picture

The templates are PHP code, you can do anything you need in those, including testing the current path so as to know which function to apply, etc. Just try it.

Thank you.
Alexis

AlexisWilke’s picture

Status: Active » Fixed

This is done in 6.x-1.x-dev and will be in 6.x-1.6

Thank you.
Alexis

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.