formly-js / formly-js/angular-formly-website

Default "Please select..." style option for select fields.

Open
#55 6 comments 0 reactions 0 assignees View on GitHub
example request help wanted
Dominant language
JavaScript
Stars
18
Forks
24
PR merge metrics
No merged PRs in 30d

Description

I would like an example that demonstrates:

How to set a default option for select fields that doesn't pass validation - basically an option with the value set to an empty string/null etc. I think this is a regular feature where the user is prompted to "please select..." but I can't find any way of doing it.

I've tried to figure this out, but seem to be getting nowhere. If it makes any difference I'm loading the values from an ajax call and filling them. When the first option has an empty string value it adds an extra option before it like this:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.