Editing a specific record on page load. IE: mysite.com/edit?id=42

Editing a specific record on page load. IE: mysite.com/edit?id=42

washuit-iammwashuit-iamm Posts: 133Questions: 55Answers: 2

My users are asking to send link to specific rows, id imagine the use case is they want to hit a URL like mysite.com/edit?id=42 and be presented with an open editor modal in edit mode. I know the edit() api pretty well, and the only thing I can come up with is fetching the individual row after page load from the server, popping it into the table somewhere and firing edit(some-row-selector).

Is there a better way?

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    You could use Editor's standalone mode for this. I don't actually have an example showing a table being individually editable on a new page (added to the to-do list now!) but this example shows a standalone Editor being used. The key different would be your id=42 being used to populate the values in the from. You could even trigger the edit() method immediately, so they don't need to click the "Edit" button like in that example.

    Allan

This discussion has been closed.