Debugging forms without flows

Posting this as “Other/Missing Category” since there’s no “forms” tag.

How is one supposed to debug a form triggered from an action? I’ve got a very simple form set up that doesn’t make use of any flows (at least, not the Forms kind of flow, there’s also the apparently-unrelated flows from Actions such as “post-login”, which I am using), and I just want to see why the {{ context.client.name }} variable is coming through empty, but, the only debugging tools available seem to be Forms Flows, not for the Forms themselves; it’s not even clear how (or why) you’d use a Forms Flow, nor why debugging is done at the Flow level when it appears to that Flows are triggered by Forms and not the other way around.

In any case, I know I can just work around the problem by supplying the client name as an input variable to the form from the action that triggers rendering it, but, it seems a bit ridiculous that you can’t get basic insight into anything your forms are doing.

Ok, this is a bit ridiculous: in order to debug why the context variable was (as far as I can tell) completely undefined in my form, I added a spurious Flow invocation in between the Start node and the text display node. The Flow in question has zero actions/components in it, I only added it so I could use it to see the incoming context data in the “Executions” view.

But once I added it, the Rich Text panel started rendering my variables correctly. {{ context.client.name }} started showing the client name rather than showing nothing at all. {{ functions.toString(fields) }} started showing my fields object as JSON, just as I would expect. Everything worked.

So I guess the solution is:

  1. If you want to inspect variable contents in your simple, no-logic form, add a flow that doesn’t do anything.
  2. If you want to reference any context information or use any helper functions in your simple, no-logic form, add a flow that doesn’t do anything, and they’ll all start working.

What’s extra weird is that even before adding the flow, {{ fields.app }} did work to show the contents of the app field passed by the action that rendered the form, but, {{ functions.toString(fields) }} did not work. After adding the flow, that started to work as well.