workflow per-state field settings: implementation preview

Events happening in the community are now at Drupal community events on www.drupal.org.
infojunkie's picture

I've implemented the per-field settings functionality in a separate module called workflow_fields at http://drupal.org/project/workflow_fields.

The functionality should work for any CCK content type, although I haven't tested each and every field type. The usage is as follows:
* Create a workflow and associate it to a CCK content type.
* The workflow state form lists all the fields of the content type and allows each field to be set as visible/invisible and editable/read-only, for the current state.
* When editing a node of that content type, fields will be hidden or disabled depending on the state the workflow is in.

LIMITATIONS:
* The creation state is not handled: all fields are editable.
* The 'view' tab of the node is not handled: all fields are displayed regardless of the state.
Those limitations will be addressed in the near future.

Your feedback is appreciated!

Comments

#access

moshe weitzman's picture

instead of remoing fields from $form, set a fapi element #access and its value will determine whether current user can see it. thats preferable over removing the form element entirely. see core node form for example. this same trick works for viewing within nodes too. drupal5 only.

interesting module.

Workflow

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: