Hi Wappler community,
I’m currently building a user management system in Wappler and am facing an issue when performing the update operation. I need to display a searchable dropdown where the username is shown, but the dropdown should also be pre-populated with the user_id when updating a user’s details.
Here’s a breakdown of what I want to achieve:
Problem Description:
- When adding a new user: I have a searchable dropdown that shows the list of users. This works as expected. I can select a
username
and store theuser_id
when creating a new user. - When updating an existing user: I need to ensure that the dropdown shows the correct
username
based on the existinguser_id
from the database. The challenge I’m facing is:
When updating, I want theuser_id
to be selected and visible in the dropdown, but I don’t want the user to change it.
I want to use a searchable dropdown (using Select2 or similar) and show theusername
but pass the correspondinguser_id
in the form.
Any suggestions on how to solve this issue?