Can Start node hidden field values be retrieved in onContinuePostLogin?

Can Start node hidden field values be retrieved in onContinuePostLogin?

I’m building a custom consent screen using Auth0 Forms and a React app rendered via api.prompt.render() in a PostLogin Action.

I need to pass two values back to onContinuePostLogin after the user interacts with my React UI:

  • dma_accepted (true/false)
  • dma_consent_type (single/continuous)

What I’ve tried:

  1. Start node hidden fields — defined dma_accepted and dma_consent_type as hidden fields in the Start node, then tried setting them via document.querySelector('[name="dma_accepted"]') before submit. The query always returns null — no DOM element is rendered for Start node fields.

  2. context.form.setValue() + goForward()setValue silently fails and goForward() hangs indefinitely on a pending WebSocket (wss://relay-dev.account.booking.com:3000/ws).

  3. POST to /continue — returns 400 Bad Request when posting custom fields directly.

  4. sessionStorage — client-side only, never reaches the Action.

What works (partially):
Adding Text Input controls directly in the Step, then using document.querySelector('[name="dma_accepted"]').value = 'true' before clicking the Continue button — this successfully passes values to event.prompt.fields in onContinuePostLogin. This mirrors the solution described in this thread.

My question:
Is there any supported way to pass values set programmatically (from a custom React app) back to onContinuePostLogin using Start node hidden fields — without needing to add visible/hidden Text Input controls in the Step?

Or is adding Step-level Text Input fields the only supported mechanism for writing data back to event.prompt.fields?

Any guidance appreciated. Thanks!

Hi @kathan.shanmugapriya

Welcome to the Auth0 Community!

To directly answer your question: No, you cannot use Start node hidden fields to pass data back to onContinuePostLogin . Adding Step-level Text Input controls (and hiding them from the user) is the only officially supported mechanism for writing custom programmatic data back to event.prompt.fields .

Your partially working solution (using document.querySelector on a Step-level input) is exactly the correct architectural approach for custom UI integrations within Auth0 Forms.

If you have any other questions, let me know!

Kind Regards,
Nik

Hi Nik,

Thanks so much for the clarification! Glad to know that using the Step-level input is the right approach for custom UI integrations.

I’ll continue with this method and reach out if I run into any more questions. Truly appreciate your guidance!

Cheers,
Shanmugapriya