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

Allow (some) fields to omit label, show only placeholders #35

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tiberiuichim
Copy link
Member

No description provided.

Copy link

@Arhell Arhell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erral erral self-requested a review September 30, 2022 06:16
Copy link
Member

@erral erral left a 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}
Copy link
Contributor

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}
Copy link
Contributor

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}
Copy link
Contributor

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?

@giuliaghisini
Copy link
Contributor

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.

agree

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

Successfully merging this pull request may close these issues.

None yet

4 participants