Add a back button to your app

In this article, we'll go over how to create a back button that functions the same way as your built-in browser back button

  • Not yet re-checked
  • Classic builder

Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

In this article, we'll go over how to create a back button that functions the same way as your built-in browser back button

First, we'll need to add an HTML component to the page you want to add a back button

Screenshot for “How to add a back button to your app”

Then we'll need to add the following code to the Source code of the HTML component

html
<p><button class="btn btn-primary back-btn">Back</button></p>
Screenshot for “How to add a back button to your app”

And to finish off, we'll need to add the following code to the JavaScript section of the page.

Text
$('.back-btn').on('click',function(){
    window.history.back();
});
Screenshot for “How to add a back button to your app”

Was this page helpful?

Something wrong or missing on this page? Tell us.