Need some help on double input value from on source

I have a form with a hidden field for id-user and I have a select field in the form that gets the text field and value field from a table “users”. The value field in the select will add the users name. Now I want to add the user_id belonging to that name to be added in the hidden field.
I don’t know how to do this, at least I can not figure this out by myself.
Can anyone help me with this please?

Hi,
Can you please share the code and also the server connect data JSON?

Should be something like so …

input type=“hidden” name=“hidden_field” dmx-bind:value=“select_field_name.value”

Tried that, but that will just copy the input form the select field to the hidden field. Which is not what I am looking for. I need to input the user_id belonging to the selected name

That is above my knowledge grade. I don’t even know where to find the server connect data JSON. :hot_face:

You need to explain this. Why isn’t the select option value the user_id ?

Right click on the action name and select ‘open in editor’ if you want to see it. #becareful

Assuming you have a SA with a pointer to the record containing the name and user_id

In the dynamic Events of the field via the Data event, using the Value Changed dynamic event within the picker select the input=> Set value then select the value from the appropriate SA with the picker

In browser, open dev tools and goto networks tab.
There, you should see your server action. Click on it and share the contents of response tab in that.

The value should be stored in the select
so assuming this is a dynamic select, you have a table

NAME, ID
John, 1
Mike, 2
Robert, 3

So in the Options Properties of the select you see

image

Your data source is the server connection
Your text field is the name
Your value field is ID

So when a user selects a name, the value of your select (say select1) is set to the ID, the element you want.
Not sure why you would then need to duplicate it but you can set the value as I showed above to the ID
But you should be able to “Pick” the value from the select (select1.value) and use set value to assign it to the hidden input like this:

Problem with this solution is that when the admin wants to change the clients handler, he will see the ID instead of the name of the handler.
I changed the lot to, instead of selecting a user for the client, I now can select a client in the select field from the table “clients”.
That way can add the name and the user id to the clients table.
Thanks for all your effords.