Can I use Server Connect POST without forms?

I have some ‘micro-actions’ for changing statuses for things like student notes and I would much rather not have to have forms for each “Close Note” & “Reopen Note” button in a dropdown sitting in a repeater like below just for a tiny update.

image

A few questions come to mind in how to forego forms.

  1. Can I use a Server Connect route with parameters? And if so, how do I get the route to run as an XHR request? Currently, it navigates away from the current page & goes to the response from the SC action. The current setup I have:
    image
    The whole path: /api/students/notes/closeOpenNote?dir=:dir&date_closed=:date_closed&staff_closed=:staff_closed&id=:id

  2. Should I just add a Server Connect element and use the $_GET variables so I can set the parameters during the SC load action? I know $_GET should be used for retrieving data, not posting, however, this seems to be the easier option.

Any guidance most welcome.
Thanks all,
Michael.

Community Page
Last updated: