Automattic / WP-Job-Manager

Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
https://wpjobmanager.com
GNU General Public License v3.0
895 stars 366 forks source link

Improve client-side UI validation #1163

Open donnapep opened 6 years ago

donnapep commented 6 years ago

Description of the problem

We should consider improving the client-side validation UI to prevent issues like https://github.com/Automattic/WP-Job-Manager/issues/1158. See also https://github.com/Automattic/WP-Job-Manager/issues/842.

Perhaps we could borrow from what WooCommerce does:

account-validation

jom commented 6 years ago

@donnapep The screenshot you provided is from a third-party theme (I think Jobify?) and not provided by core. Were there other improvements specific to the job submission you had in mind?

donnapep commented 6 years ago

The validation when posting a new job is inconsistent. For example, if I don't enter a Title, I get immediate feedback because it's set to a required field:

screen shot 2018-03-28 at 6 51 01 am

But if I don't enter a Description or Category, the page does server-side validation instead:

screen shot 2018-03-28 at 6 51 51 am

It would be nice if the validation were consistent. And, for server-side validation method, the error message included all required fields so that the user doesn't have to keep re-submitting only to be told they need to fill out another missing field.

spencerfinnell commented 6 years ago

@jom @donnapep with #1257 accepted can this issue be milestoned too? We see a fair amount of confusion/frustration by our users regarding this.

I'm personally of the opinion that client-side should be removed since non-standard fields like TinyMCE will likely tend to cause complications. All server side validation at once would make the whole experience much more consistent. There is obviously the benefit of instant feedback with client side but unless it can be perfected for all fields I don't think the trade off is worth it.

roundhill commented 5 years ago

~The description field uses tinymce, so it is in an iframe that we can't validate using HTML 5 😭~

I found a solution using setCustomValidity() thanks to a tip from @jom. See #1732

danjjohnson commented 4 years ago

Reopening this because two of the referenced issues are ongoing.

The first is that on themes with a fixed header, the field that is not valid is hidden behind the header, causing confusion, as mentioned here: https://github.com/Automattic/WP-Job-Manager/issues/1158#issuecomment-325497944

The second is that the validation is still inconsistent, with client side validation for most fields, but server side only for file uploads: https://github.com/Automattic/WP-Job-Manager/issues/1163#issuecomment-376846040

cena commented 3 years ago

https://wordpress.org/support/topic/workaround-for-field-validation-error-notice/