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

Fix not having Text widget set when creating questions #3353

Closed
wants to merge 3 commits into from

Conversation

chrisvanrun
Copy link
Contributor

This PR sets the default of the question answer_type to TEXT on the model level. It was already indirectly the default via the form and being the first option. For the widget choices, this was not clear during the initial render so the options were left empty.

The alternative is to fix it on the Form level but it seems better to make it explicit on the model level.

@chrisvanrun chrisvanrun requested a review from amickan as a code owner May 24, 2024 14:10
@chrisvanrun chrisvanrun requested a review from jmsmkn May 24, 2024 14:11
@jmsmkn
Copy link
Member

jmsmkn commented May 24, 2024

The alternative is to fix it on the Form level but it seems better to make it explicit on the model level.

Actually, I think this is better to fix on the form level as it is a problem with the form. The only change I think that model field should have is blank=False, we want users of the field to be explicit about setting the question type.

@chrisvanrun
Copy link
Contributor Author

Will implement in a different PR.

@chrisvanrun chrisvanrun deleted the fix-text-question-widget branch May 24, 2024 14:37
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

Successfully merging this pull request may close these issues.

2 participants