Usage¶
Using the module comes down to three steps:
- Build a workflow that reads the entity and ends
with a node returning
processed_content. - Attach the workflow to a field on the form display. See Configuration.
- Editors click the button on the field and pick a suggestion.
What the editor sees depends on the field type:
- Text fields: the suggestions appear in the Field Widget Actions suggestion UI and fill the field when chosen.
- Entity reference fields: the suggestions appear as clickable chips in a dialog.
What happens on a click¶
sequenceDiagram
actor Editor
participant Form as Entity form
participant Action as Field widget action
participant WF as FlowDrop workflow
Editor->>Form: Click action button
Form->>Action: AJAX request (form validation skipped)
Action->>Action: Check permission and workflow
loop Once per suggestion (1 to 3)
Action->>WF: Run with entity context
WF-->>Action: Node outputs
end
Action-->>Form: Suggestions, or an inline message
The button never saves the entity. Required fields that are still empty do not block it, because form validation is skipped for the action button.
Messages next to the field¶
When the workflow returns nothing, a message appears next to the field and fades after a few seconds:
- If any node returns a truthy
no_matchkey, the message says no suggestions were found and the remaining runs are skipped. - Otherwise, if a Messenger node in the workflow added a message, that message is shown. Errors win over warnings, warnings over status messages.
- Otherwise a generic "The workflow did not produce any results." warning.
If the workflow throws an exception, the editor gets a generic error and the
details go to the flowdrop_field_widget_actions log channel.