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

widgets: Make sure the customValue and customChoice still work #819

Open
tahini opened this issue Dec 12, 2024 · 3 comments
Open

widgets: Make sure the customValue and customChoice still work #819

tahini opened this issue Dec 12, 2024 · 3 comments

Comments

@tahini
Copy link
Contributor

tahini commented Dec 12, 2024

And streamline and document their behavior, which is currently spread in many places.

Currently, only the 'radio' input of the 'question' widget supports a custom choice and value, through the 'customPath, 'customChoice', customLabel' and 'addCustom' fields. But the customPath is used and sent to many functions, un-necessarily. There's a a lot of code associated with it and it's not certain that it really still works (and how!)

1- Should we support the custom value with other widgets? (for example, select, checkbox, etc)
2- Document the 4 parameters involved in the behavior and add tests for them
3- Make sure the widgets send the correct data and it is properly handled by the widget preparation function.

@samuel-duhaime
Copy link
Collaborator

@tahini
For your point 1. Yes, it will be useful to have that on the checkbox and maybe select. I would have used it a few times in my surveys.

@tahini
Copy link
Contributor Author

tahini commented Dec 12, 2024

Also, the widget preparation function uses a customDefaultValue that is not defined for any widgets. Is it needed? If so, we need to define it in the configs

@samuel-duhaime
Copy link
Collaborator

@tahini
We sometimes use defaultValue, for example, when we hide some questions but know what the answer would be. However, I don't remember using customDefaultValue anywhere.

@kaligrafy Any idea ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants