I need translate text "Please fill out this field", so where is it located?
Thank you for your time :)
Tuesday, April 15, 2014 at 1:33 PM EST
Are you referring to some form on your page? That would be in the label or placeholder attribute inside the actual html document you are editing. It is not located anywhere else ...
This is ur error Massage could u post ur Code there are different ways to post the error Massage usually it would be
<small class="error">Please fill out this field</small>
But i think u are not using the Foundation Forms do u?
There is a "required" Tag so if u using php this would stand in ur php file
Yes i know what u mean but there has to be an php file for example what stand in ur form tag like
<form method="POST" action="YOUR_FILE">
In this file u will find the "Please fill out this field" text
I checked your screenshot, and that error message you see is in fact part of the new HTML5 protocol when you use the required attribute. The text you are seeing is in fact part of your browser, and will display different message based on the language of the users browser ... It is not anything in Foundation or the html.
You can in fact change it by using a new function input.setCustomValidity(msg), but its a bit tedious and not native to Foundation in any way:
As far as I can see though, Foundation Abide already locks into the new html5 API with the required attribute, and will prevent it from displaying if you have added required Abide inputs correctly ... Perhaps we can look at your code? Are you adding the <div> wrappers and <small> error elements as you should be?
I made form like that:
<input type='text' name='Name' placeholder='Your name' required/>
Everything works, but now I need translate this text "Please fill out this field" to my language only, nothing more.
Thank you guys but It isn't solve my problem.
@Alexander: I use Foundation Forms. When I paste your code, it display error message (Like: Error States in http://foundation.zurb.com/docs/components/forms.html ), but It isn't what I want.
So, I show you what I need.
I created normally Foundation form, with text Input:
When I submit form with empty input, form display text "Please fill out this field", screen of this:
Its OK, and I need translate text "Please fill out this field" to my language only.
work for me as newbie
<input type='text' name='Name' placeholder='Your name' oninvalid="this.setCustomValidity('Set your name!!')" required/>
Please note that the code above will definitely show an updated error tooltip, it will also prevent the tooltip from being dismissed, and may prevent the form itself from validating.
To use this code properly, it should be revised as shown below:
<input type='text' name='Name' placeholder='Your name' oninvalid="this.setCustomValidity(this.willValidate ? '' : 'Set your name!!')" required />
Although I would recommend choosing a friendlier error message!
Create an Account
Get up to speed FAST, learn straight from the experts who built Foundation.
Learn Foundation from the creators in our interactive online webinars which will keep you up to date with the latest trends and skills needed to win your projects.
Or if you prefer, contact the Foundation Team at [email protected] or (408) 341-0600 x635