-
Notifications
You must be signed in to change notification settings - Fork 8
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
Allow (some) fields to omit label, show only placeholders #35
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @SaraBianchi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this, but I don't know if the naming of the option is clear enough "Use labels as placeholders", perhaps it is worth to add a description saying "labels will be hidden and the content of the label will be shown as placeholder".
Moreover it would be nice (but I don't know if that's possible), that when the option is checked the preview of the form changes to reflect the made option, this way the end user can understand the option better.
{...(isInvalid() ? { className: 'is-invalid' } : {})} | ||
/> | ||
)} | ||
{field_type === 'textarea' && ( | ||
<TextareaWidget | ||
id={name} | ||
name={name} | ||
title={label} | ||
title={labelsAsPlaceholders ? '' : label} | ||
placeholder={labelsAsPlaceholders ? label : ''} | ||
description={description} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not 'columns' prop here too?
@@ -85,7 +89,7 @@ const Field = ({ | |||
<SelectWidget | |||
id={name} | |||
name={name} | |||
title={label} | |||
title={labelsAsPlaceholders ? '' : label} | |||
description={description} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not 'columns' prop here too?
@@ -184,7 +188,8 @@ const Field = ({ | |||
<EmailWidget | |||
id={name} | |||
name={name} | |||
title={label} | |||
title={labelsAsPlaceholders ? '' : label} | |||
placeholder={labelsAsPlaceholders ? label : ''} | |||
description={description} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not 'columns' prop here too?
agree |
No description provided.