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

Contact form feedback and email field settings #420

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

Bhavatu
Copy link
Contributor

@Bhavatu Bhavatu commented Oct 18, 2024

Feedback forms comment field ("Feedback") and email field can now be hidden, optional or required based on settings from the backend.

Depending on backend: https://github.com/kausaltech/kausal-watch-private/pull/281

@Bhavatu Bhavatu force-pushed the feature/contact_form_feedback_field_optional branch from 87450f4 to 3e046a4 Compare October 18, 2024 14:20
@Bhavatu Bhavatu requested a review from bbliem October 18, 2024 14:25
Copy link
Contributor

@tituomin tituomin left a comment

Choose a reason for hiding this comment

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

Some non-obligatory style comments

if (Array.isArray(value)) {
return value.length === 0;
}
return value === '' || value === null || value === undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

value.trim() ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, you can use value == null instead of value === null || value === undefined
Also, you should maybe move the null/undefined check first, then you can add the trim()

@Bhavatu Bhavatu merged commit acb091f into master Oct 21, 2024
3 checks passed
@Bhavatu Bhavatu deleted the feature/contact_form_feedback_field_optional branch October 21, 2024 08:49
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.

2 participants