How can I identify and designate a custom webform submission field (i.e. Status) to be used with the "Table Highlighter" module to change the color of a view item/row when the status is "completed"? (see attached photo: 02-TableHighlighter-Options.png)

For instance, if I wanted to change all table rows to red that were based on nid = 76 I would use the following PHP code:

if ($webform_submissions_nid=="76") return 'red';

What code would I use to change all table rows to red if the "Status" = "completed"? Here are some additional details:

1. Node. The webform node equals 76

2. Submission Data. The status submission data is: webform submissions data: Value (Status) [see attached photo: 01-WebformField-Status.png

Thank you in advance for your help.

Comments

jenna_katie_matthews created an issue. See original summary.

liam morland’s picture

I think $webform_submissions_is_draft will do what you need. If it's not a draft, it's complete.

jenna_katie_matthews’s picture

Thank you, however I have to be able to identify the custom "Status" field in the webform submission which has value states of "assigned", "in-progress" or "completed". How do I identify the custom webform "status" field?

i.e. @webform_submissions[what next] ...

Once I identify the field, I can then check for the 3 different states.

liam morland’s picture

It is uses Webform tokens, you need to use the form_key to identify the component. I'm not familiar with Table Highlighter. You might need to add some debugging statements, such as dpm(), to the code to see what variables it has access to.

liam morland’s picture

Status: Active » Fixed

If you need more help, please re-open and provide details.

Status: Fixed » Closed (fixed)

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

avpaderno’s picture

Issue tags: -Webforms, -#views Table Highlighter