Jump to content
  • 0

Can the View Details button be moved to the left?


DLReich
 Share

Question

I have many columns in a report so the View Details button, which is on the right end of each report row, is not easily seen.  I would either like to move it to the left end of each report row or recreate it as a custom button at the left end.  Does anyone have the source  code for recreating that button?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

You should be separating your report and details in two pages and add HTML Block to create the link to details

http://howto.caspio.com/tech-tips-and-articles/tech-parameters/results-and-details-on-two-separate-web-pages/

Or you can make one of the fields you are showing on the report to be the link to details in "  Details Page" screen.

Link to comment
Share on other sites

  • 0

Hi @DLReich,

 

If you also wish to place the View Details link on other columns aside from the first and last column (since those are the only options on the Styles), say you want to place it in the middle or maybe on the column before the last column, you can do this using JQuery. So on your DataPage, add a Footer  (make sure to disable HTML editor) and paste the following:

 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>


<script>

jQuery.moveColumn = function (table, from, to) {
    var rows = jQuery('tr', table);
    var cols;
    rows.each(function() {
        cols = jQuery(this).children('th, td');
        cols.eq(from).detach().insertBefore(cols.eq(to));
    });
}

var tbl = jQuery('table');
jQuery.moveColumn(tbl, 3, 2);


</script>

 

Wherein the 3 in the last line (jQuery.moveColumn(tbl, 3, 2);) refers to the nth-order the View Details link comes in, and 2 is the column order where you want to now place the View Details link. You can switch up these numbers based on your liking. Like so:


1051175525_switchcolumns.thumb.png.552ef84d107756a25b265622a166fb95.png

 

 

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

 

 

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.

Guest
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.

Loading...
 Share

×
×
  • Create New...