Hiding view only fields when editing

Balefire - December 1, 2008 - 01:51
Project:Workflow Fields
Version:5.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:kratib
Status:closed
Description

I have a custom node type with a large quantity of fields, each of which are only to be editable in certain stages of a workflow, and available to view only in stages after they have been edited - e.g.
Fields:
Title
Tested
Tested by
Test Date
Faults Fixed
Engineer
Engineering Date
Notes

Stages:
Creation
For Testing
For Engineering (Fixing)
For Soak Test
For Sale

The fields are in a fieldset, given weights from -10 to 9. When a node is in For Testing, only Tested, Tested by, Test Date & Notes are set to be visible and editable. Faults Fixed, Engineer, Engineering Date are set to be not viewable or editable. When a node is in For Engineering (Fixing), Tested, Tested by, Test Date are to be visible but not editable, Faults Fixed, Engineer, Engineering Date & Notes are visible and editable. Finally when in For Sale, all fields are visible but only Notes is set to be editable.

When editing a node in For Engineering (Fixing), the non-editable fields Tested, Tested by, Test Date appear above Title (I'm guessing because they are given a weight lower than -5) and not in their assigned fieldset with the editable fields. A similar situation appears in For Sale - the viewable but non-editable fields are arranged outside their fieldset but according to their weight. The fields appear in the correct position when viewing. How can I either:

  1. Make the non-editable but viewable items be hidden when editing a node
    or
  2. Make the non-editable but viewable items appear in the fieldset

I personally would prefer the former, but would take the latter if necessary :)

#1

kratib - December 3, 2008 - 04:08
Category:support request» feature request
Assigned to:Anonymous» kratib

It's definitely easier for me to hide the fields than to place them in a fieldset :-) So I'll add a setting to that effect in the admin screen and let you know when it's done.

#2

Balefire - December 3, 2008 - 21:27

Cool, very much appreciated!

To me, having the view-only fields invisible when editing makes more sense - it helps focus the user on what they need to do for that particular stage and prevents overwhelming them with fields.

#3

kratib - December 10, 2008 - 21:54
Version:5.x-1.1» 5.x-1.x-dev
Status:active» fixed

Committed to D5 and D6-dev. Please wait 12 hours for Drupal.org to refresh the releases.

Workflow Fields has now a settings screen in Site configuration to allow turning on or off the option of hiding read-only fields in the editing form.

#4

Balefire - December 12, 2008 - 22:48

Thanks for this and apologies for not responding earlier - was caught up in other areas and only came back to check today. If there are any issues I'll let you know but none so far.

Great job :)

#5

System Message - December 26, 2008 - 22:52
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.