This topic is locked

Auto open edit from list page

4/28/2017 10:56:38 AM
PHPRunner General questions
G
GregJ author

User logs in, sees own record in list page. I would like to have Edit automatically open in popup forcing the user to edit. The edit button on this list page currently works fine but users just skip past it / don't see it / blah blah.
I found this code in the manual for 9.7 (I'm on 9.6):



// get list of record IDs

var recsId = pageObj.inlineEdit.getRecsId();
// click Edit link

$("#editLink"+recsId[X]).click();


When I put this code in the Javascript Onload for the list page shouldn't the Edit page pop up automatically once the List page has loaded?

G
GregJ author 4/28/2017

Solved this myself by reading more of the context on the manual page. X is substituted with the record # of the item on the page that I want to edit. Since there is only one record on the page I substitute X with 1 and it works perfectly.