You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
API: options created without optionType are stored but not rendered #3505
Create a form and a multiple_unique (or dropdown / multiple) question via the API.
Add options without specifying optionType:
POST /ocs/v2.php/apps/forms/api/v3/forms/{formId}/questions/{questionId}/options
Content-Type: application/json
{"optionTexts": ["Yes", "No"]}
Expected behaviour
The options are selectable in the rendered form. optionType is documented as optional, and DataStructure.md states "choice is the default for normal option lists."
Actual behaviour
The options are stored with optionType: null. The API returns them in GET .../forms/{id}, but the frontend does not render them. The question appears with no selectable answers; if it is required, the form cannot be submitted.
The failure is silent: no error, options present in the API response, just not shown.
Root cause
ApiController::newOption() never applies a default optionType. The option_type migration (Version050300Date20250914000000) backfills existing null types to choice, but new inserts through the API keep a null type again.
Activity