Convert plain js variable to ejs variable

I want to use a variable that I save on the clientside in ejs code. Any ideas on how? The variable is the value of a <select>

get the value and put it in the backend?

I ended up having to do something with ajax.

Interesting… what exactly did you do? You were able to send form values to the backend without refreshing?

I ended up only using backend for folks logged in as a normal user, as they don’t see the select anyway, and then only doing ajax client-side for folks who are admins, as they do and therefore admins seeing the code and response isn’t bad

1 Like