Full width Edit-link/Detail-link per Row in Views

By: Matt Clute | Asked: 09/29/2022
ForumsCategory: General questionsFull width Edit-link/Detail-link per Row in Views
Matt CluteMatt Clute asked 2 years ago
Would it be possible to apply a detail-link or an edit-link across an entire row? As of now my link for each entry is constrained to the text on the far right side as either "Edit" or "Update". Ideally it would be best if clicking anywhere along the row would act as an edit or detail link, especially when viewed on mobile devices. See image below for the grid design. Thanks!
Attachments
1 Answers
Rob LeVineRob LeVine answered 2 years ago
I've done this before.  What you need to do is figure out the direct link to the edit page, which you can do by using your view to go to the edit page, copying that URL and wrapping your view's contents in that anchor.   e.g., If your edit page is: https://mysite.com/referral/?frm_action=edit&entry=62466  then you'd wrap each field shortocde with <a href='https://mysite.com/referral/?frm_action=edit&entry=[id]'>[99]</a> where 99 is your field id.
Bobby Clapp replied 2 years ago

That's a good lead in. I'm doing something like that now. I had to create an outer div and using some positioning elements to make it wrap the whole row correctly. Give Rob's example a shot though. At it's very base, it works like he indicates.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right