Menu icon Foundation
Where is located "Please fill out this field"?

Hello,
I need translate text "Please fill out this field", so where is it located?
Thank you for your time :)

translatefield

Hello,
I need translate text "Please fill out this field", so where is it located?
Thank you for your time :)

Karl Ward over 5 years ago

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 ...

Peter over 5 years ago

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.

Alexander Assimidis over 5 years ago

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

Peter over 5 years ago

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:

<input type='text' name='Name' placeholder='Your name' required/>

When I submit form with empty input, form display text "Please fill out this field", screen of this:

http://imgbox.com/oiuIWqeU

Its OK, and I need translate text "Please fill out this field" to my language only.

Alexander Assimidis over 5 years ago

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

Karl Ward over 5 years ago

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:

http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-message
http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-cva-setcustomvalidity

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?

Linggaar about 4 years ago

work for me as newbie

<input type='text' name='Name' placeholder='Your name' oninvalid="this.setCustomValidity('Set your name!!')" required/>

Michael Wendell almost 3 years ago

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!

m.