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

First option selected in getData #621

Open
rssluca opened this issue Sep 25, 2017 · 4 comments
Open

First option selected in getData #621

rssluca opened this issue Sep 25, 2017 · 4 comments
Labels

Comments

@rssluca
Copy link

rssluca commented Sep 25, 2017

Hello all,

The first option is selected in getData even when there is a placeholder (in select fields). Ideally, no options should be selected by default unless specified by the user.

@rssluca rssluca changed the title First option selected First option selected in getData Sep 26, 2017
@kevinchappell
Copy link
Owner

kevinchappell commented Oct 3, 2017

That is the default functionality of select control however you can configure it to work differently as demonstrated below or use a checkbox group.
select-placeholder

Alternatively you could use the replaceFields option to change default functionality of the select field.
https://codepen.io/kevinchappell/pen/GMMYWO

@kevinchappell
Copy link
Owner

Reopening because after thinking about it... this is a bug. Ideally setting a placeholder should de-select the default option.

@kevinchappell kevinchappell reopened this Oct 3, 2017
@kevinchappell kevinchappell added this to the 2.10.0 - Aardonyx milestone Oct 4, 2017
@rssluca
Copy link
Author

rssluca commented Oct 10, 2017

Thanks for looking at this Kevin, I ended up removing lines 397 to 399 in form-builder.js. I don't need the first option to be selected anyway :)

@kevinchappell kevinchappell removed this from the 2.10.0 - Chill Cat milestone Nov 3, 2018
@lucasnetau
Copy link
Collaborator

@kevinchappell this is handled by formRender and the extra selected option has no effect. Should we close this or we you wanting to have the radio buttons on the edit field Options container disappear when a placeholder is set?

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

No branches or pull requests

3 participants