Jump to content
  • 0

Custom Back button on Details DataPage that goes back to the search form





I'm using a Details DataPage with a search form and I'm aware that there is a 'Search Again' link that takes me back to the search form, but can I instead have a Back button beside the Update button that essentially behaves the same way as the 'Search Again' link?



Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0


You can try doing the following steps:

1. Add an HTML block, disable the HTML editor, and add the following:
<input name="BackButton" id="BackButtonID" value="Back" class="cbUpdateButton">


2. Add a Header & Footer. Select the Footer, disable HTML editor, and paste the following:


var element = document.getElementById("BackButtonID");
element.onclick = function(event) {

location.href = document.querySelector("a[data-cb-name='SearchAgainButton']").href;


What this does is create a function for the custom button so that when it is clicked, it takes you back to the href value of the 'Search Again' button. 

You can also hide the 'Search Again' field if you want, by using the following CSS:



visibility: hidden;



Sample DP: https://c1hch576.caspio.com/dp/db26a00071004f6ee7ef445db600



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...