Handling going to next step from a HTML block in Auth0 Forms

I’m using Auth0 Forms and have created a form step using only an HTML block (no pre-built templates or scripts). I need to handle advancing to the next step in the form flow from within the HTML block, but I can’t find any documented method or function that allows this.

Is there an officially supported way to trigger moving to the next step from within a custom HTML block?

Any help or workaround would be appreciated!

Hi @venkatasaimourya.and

Welcome to the Auth0 Community!

Thank you for posting your question. Can you try to recreate the Next Button in the HTML:

<button id="my-custom-button" type="button" class="af-button af-nextButton">
  <span class="af-button-text">Continue</span>
</button>

And then attach a click listener that will make the form go forward:

<script>
  document.querySelector('#my-custom-button')
    .addEventListener('click', () => $form.goForward());
</script>

Let me know if this fixes your issue!

Thanks
Dawid

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.