Automattic / Automattic/WP-Job-Manager

Add error class to the fields wrapper after job submission

Open
#1,713 1 comment 0 reactions 0 assignees View on GitHub
Enhancement
Dominant language
PHP
Stars
899
Forks
369
Avg merge
11h 37m
Merged PRs (30d)
12

Description

If some fields are invalid during form submission, the form shows a red error message at the very top, referencing the fields that are invalid, but doesn't add error class to fieldset wrapper due to which theme developers cannot style the invalid fields.

For example, if user provides an invalid email the following error will appear at the top of submission form:

![image](https://user-images.githubusercontent.com/10553273/55896240-4aa60000-5bd7-11e9-9e50-568d4787ec65.png)

But the actual field will have no indicator (e.g. red border) since there is no error class applied to the fieldset container.

![image](https://user-images.githubusercontent.com/10553273/55898185-82af4200-5bdb-11e9-93fc-6a5cfbfa7ed8.png)

It would be great, if you can add an error class to fieldset wrapper in this case, which will allow theme developers to uniquely style the troubling fields.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the submission form renders its fieldset wrappers and handles invalid fields after job submission. Reproduce the issue with an invalid email; done means the affected fieldset receives an error class that theme developers can target.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.