Pass a variable on the front end to server after form post

Hi Wapplers,

I have a form that I submit which executes a database insert action however I would like to store another table ID in this table which I can access but can’t seem to send to the server. I can do it via a hidden text input because I get the variable using another action, but this doesn’t seem like an elegant solution. Any tips?

I realise that there is an older post asking the same:

why is that? Is this value holding any sensitive data, that’s not supposed to be displayed on the page?

It just seems silly to have to send a variable back to the server via an input form… I thought that the server action could read a variable you set on the client side via $_GET.

On form submit you send POST vars to the server action, so you can use a hidden inputs perfectly fine.

1 Like

Fair enough… happy to keep doing it just wondering if there was another solution out there that’s all.