Selected value not being set

Returning a data record for a user, there’s a field being returned called usertype, which indicates their permission level.

Selected value is set to the query that pulls this data for that field. and the Options have values that match. However, the selected value isn’t working at all. even though it matches. So I’m doing something wrong somewhere.
image
image

Does the value field in the select match EXACTLY the value returned by getSingleUse…usertype?
Check I’m the developers console network tab to see what is being returned by the query

already did that. it matches the value exactly… here are two examples, when i click on the user it should change the select to that person’s value in “usertype” and it is not. Doesn’t matter who i click on, the select doesn’t change.
image
image

Perhaps try new AC2 file in the below post if appropriate. Seems to a few issues of this type being reported.

I tried recreating this issue but it works fine for me, using the latest extensions from the beta channel.
Are you on beta or stable channel?
Can you please paste your select input code?

Stable.

 <div class="form-group mb-3 row">
    <label for="inp_usertype" class="col-sm-2 col-form-label">Permissions</label>
        <div class="col-sm-10">
             <select id="select1" class="form-control" name="usertype" dmx-bind:value="getSingleUser.data.query.usertype">
                  <option value="external">External</option>
                  <option value="agent">Agent</option>
                  <option value="admin">Admin</option>
                  <option value="sysadmin">Sys Admin</option>
              </select>
     </div>
 </div>

Is this a single result query?

nope, it’s a return from mysql, the data is there as it should be. the form is populated. It’s only the “Selected Value” that’s not working.

So it is actually a single query in your server action?

yes, it sends the user ID and returns those fields about the user, which populates a form in a modal. One of those fields is the drop down for the permissions.

promised i’ve changed NOTHING… and it’s now working :laughing:

Which I’m good with it! no clue what made it start working but let’s just back away slowly and accept the IT gods smiled on me today.

1 Like