Maybe I’m misunderstanding how it’s supposed to work, but according to this from the documentation, the server connect should automatically see the param on the server side without having to add it as a $_GET variable directly to the server connect, but it never appears server side: It is important to understand that the Server Connect used on the page inherits all the input query parameters or route path parameters of the current page, so it will automatically “see” them in the URL.
Yea I caught that after I took the screenshot, but even after they all matched it doesn’t work. I’ll upload a new screenshot. I thought I had screenshot it afterwards haha.
You are mixing server connect routes and page routes.
The route in your screenshot is for a page - so the param is only available on the page.
To make the value available on any server action used on the page via server connect, you need to pass the value.
If you create a server connect route (which is actually a route for server action/API), then in the SA you will be able to access the value under $_PARAM.
Thanks for the reply, @sid I know how to pass the value directly on the server connect from the front end, I’m actually trying to do what you say in the last sentence. Access it on the server side via the $_PARAM without passing it directly on the server connect from the front end. Perhaps, I’m still not understanding what the diference in $_PARAM and $_GET on the back end is.
The only case where that would work is in the Server Side Server Action.
On the page’s App node, if you have set the server action under server side data option, then that server action can access the URL param via $_PARAM.
Otherwise, only if a server action is opened via server connect route (not from a page) directly as a page, the params are available under $_PARAM.
P.S. This all probably sounds like jargon, but I would have to write a lot more to explain it in words. So hope you can make some sense of it.
You are correct, I think I’m more confused now haha. Appreciate the reply. I’ll need to read your explanation later when I’m more alert. I’ll probably understand it then. Got up WAAAYYY to early this morning.
FYI, this is what I was following when the $_PARAM didn’t work as expected.
It doesn’t apply to your current situation, what you’re doing is the “traditional” Wappler way of calling a Server Action, which is a case of client-side rendering.
From what I can tell, select server action only works with meta tags, which I have working successfully. But it won’t work the way I was expecting. I’ll shleve this for now. Appreciate all you guys’ help.