PWaddict Posted May 4, 2018 Share Posted May 4, 2018 Currently we get the field's name on the error messages which is perfect for superusers but I would like to make them more user friendly for non-superusers by displaying the field's label instead of name. So this: Missing required value (news_text) Should be changed to this for non-superusers: Missing required value (Text) Link to comment Share on other sites More sharing options...
PWaddict Posted May 13, 2018 Author Share Posted May 13, 2018 Changing the Inputfield.php 1461 line with the following it displays the field label. How can I do it with a hook? $text .= $this->name ? " ($this->label)" : ""; 2 Link to comment Share on other sites More sharing options...
Juergen Posted May 13, 2018 Share Posted May 13, 2018 Thanks for the hint! Link to comment Share on other sites More sharing options...
kixe Posted May 31, 2018 Share Posted May 31, 2018 @PWaddict Thankshttps://github.com/processwire/processwire/commit/79fa81d8a87a1d026d8f763021b8df191f48a4e0 1 Link to comment Share on other sites More sharing options...
PWaddict Posted May 31, 2018 Author Share Posted May 31, 2018 I forgot to update the topic. On the PW 3.0.104 version we get the field labels instead of the field names on "Missing required value", "Restored previous value" and "Page unpublished because field is required" error messages. More info on GitHub. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now