Styling the output of a field

You can set the color and other styles of a field on the form after it is saved. Create the field in your data form in the normal way as follows:

    label: Priority
    type: select
      normal: Normal
      urgent: Urgent
      critical: Critical

Above the ==== separator add a CSS module:

[[module css]]
.normal { color: green; }
.urgent { color: red; }
.critical { color: red; font-weight: bold;}

Then use a css span class and a combination of form_raw and form_data to display the field in the relevant color:

[[span class="%%form_raw{priority}%%"]]%%form_data{priority}%%[[/span]]