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

Better display of Webform fields in select list #141

Open
ghost opened this issue Apr 10, 2019 · 1 comment
Open

Better display of Webform fields in select list #141

ghost opened this issue Apr 10, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 10, 2019

When adding a field to a Webform, you choose the field from a select list. However this select list also lets you add other form elements that aren't fields (e.g. hidden, markup, page break, etc.).

I think it'd be easier to use, and look nicer, if the actual fields were somewhat separated from the non-fields. I'm thinking a 'disabled' select option (the unicode example from here). Here's a before and after of what it could look like:

webform_fields_before webform_fields_after

@ghost ghost added the enhancement label Apr 10, 2019
@klonos
Copy link
Member

klonos commented Apr 10, 2019

We could use <optgroup>:

<optgroup label="Fields">
  <option value="date">Date</option> 
  <option value="email">E-mail</option>
  ...
</optgroup>
<optgroup label="Special items">
  <option value="fieldset">Fieldset</option> 
  <option value="grid">Grid</option>
  ...
</optgroup>

We are already using that in the User: Permission visibility condition in layouts/blocks for example:

Screen Shot 2019-04-10 at 9 54 17 pm

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

No branches or pull requests

1 participant