ckan / ckan/ckanext-scheming

Feature Request: Ability to set default values for multiple_select preset

Open
#265 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
102
Forks
182
PR merge metrics
No merged PRs in 30d

Description

Currently, a good undocumented behavior of scheming when using the select preset, required is true, and having a choices list is that it will pick up the first choice list value as the default value.

This is not the case with the multiple_select preset though when required is true. It will not pick a default value and the required validator will trigger when you try to submit the form.

Would it be possible to create an explicit "default:" schema key so schema authors can add it to their scheming configuration DSL?

IMHO, it's not just good for the UI/UX, its also good for documenting the schema's behavior.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how the select and multiple_select presets handle required fields and choices, then inspect the schema configuration DSL and its validation path. Done means a default schema key can provide a multiple_select value and the required validator accepts the resulting form submission.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.