Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable for registration data not showing value for select fields #426

Closed
MartinBenediktBusch opened this issue Apr 29, 2024 · 2 comments · Fixed by #434
Closed

DataTable for registration data not showing value for select fields #426

MartinBenediktBusch opened this issue Apr 29, 2024 · 2 comments · Fixed by #434
Assignees
Labels
bug Something isn't working

Comments

@MartinBenediktBusch
Copy link
Collaborator

Overview

Transfered admin issue: Select fields should show select option value not the id (see first screenshot).

After investigation of this issue I come to the conclusion that this is a frontend rather than an admin or backend issue. Here the reproduced bug as seem from the admin:

AdminDisplay

The issue is that for SELECT fields admin displays the id instead of the value of the select field. However, admin displays what it is supposed to display as can be seen from the database view:

Database

However, also the backend does what it is supposed to do as it received the id instead of the value in case of a select field as can be seen from the network response of the frontend:

networkResponse

In summary, I think the propoer solution involves the frontend sending the value of the registration field option instead of the id in case the registration field is of type SELECT.

@MartinBenediktBusch MartinBenediktBusch added the bug Something isn't working label Apr 29, 2024
@diegoalzate
Copy link
Contributor

pros of saving the actual value:

  • simple to visualize after

cons of saving the actual value:

  • hard to check what option the user selected from a value

the way the registration field options work is that they have a key and a value. the key is the id and the value is the actual string it represents. when saving the key it is easy to know what option the user stored.

if we look at this as just data and strings, it does make sense to store the actual value more than the id as a plain value.

@diegoalzate
Copy link
Contributor

after discussing with @camilovegag we do want to go ahead with this transition but it requires changes on admin in order to make sense of previous selected values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants