[Forminator Pro] Required field error message

Hi Support,
I try to customize the error message when you leave a required field blank.
The default one is: This field is required. Please input a value.
I want to translate it but i cannot find the option anywhere.
Can you tell me how i can edit this message?
Thanks in advance!
Best regards,

Makke

  • Jonjon

    Hi there, Makke.

    Hope you are doing great.

    I have analyzed your case and I know what you mean, there is no setting in the Forminator admin or field details to customize these messages.

    However, I was able to customize them by using the language template (.pot) provided in wp-content/plugins/forminator/languages/ and creating a new language file for the plugin. You can follow the steps below to do that same.

    Of course you can also use an existing translation file (.po). In the following link https://premium.wpmudev.org/translate/projects/forminator you will find some .PO translations files that you can download and freely use as well, instead of creating a new one. The Dutch version is pretty much complete. And there are quite a few that are at least partially translated as well. Again, feel free to use them, using the steps below as a guideline to edit them if necessary.

    1. To create a new translation file. Download the translation template file (.POT) located in: /wp-content/plugins/forminator/languages/forminator.pot

    2. Next, use some translation editor software to open the .pot file and create a new translation. In this case I used (https://poedit.net/). Open the .pot file in your PoEdit and hit the new translation button as shown in the screenshot below. Remember to choose the correct desired target language and one that will match the language defined in your WordPress installation . Then save the file following this format: PluginName-langugage_variation.po. In this example ( forminator-en_US.po )



    3. Now you can edit each line as you desire, for the one you mentioned which is:

    This field is required. Please input a value.

    You can edit it in the translation text-box as shown in the screenshot below:

    You may use other tools to aid and/or automate this translation, for example:slight_frown:https://translate.google.com/toolkit/ or https://www.matecat.com/). But in this case, we are only editing English lines, so we can just edit the lines we wish to change. After you finish editing, save the file again.

    4. Next step is to copy both the forminator-en_US.po and forminator-en_US.mo files that were created on step 1 when you saved the .pot file as a new translation (so they should be on same folder as the original .pot file). And then you should paste them in your WordPress installation languages folder (If it does not exist then just create the folders), following this path: wp-content/languages/plugins/

    [image pos="5"]

    5. As you see, after purging cache I have accessed the form again and the new modified texts appear in my form.

    [image pos="6"]

    I hope to have helped and feel free to ask me if you have any doubts.

    Best Regards,
    Jon

  • Jonjon

    Hi there, Makke.

    Thank you for your positive feedback, it means a lot to us :slight_smile:

    I apologize, seems there were two images missing from previous post.

    From Step 4:

    From Step 5:

    One more important thing, Makke. It's good that you found a solution, however please note that in case you update those plugin files, for example:

    wp-content/plugins/forminator/library/fields/name.php

    These hard-coded changes in source files will probably be lost on plugin updates okay? Because those files might be replaced by new ones. Also, if you change your WordPress language you will not be able to have these texts translated by the WordPress engine itself, so using the __( and _e( WordPress functions is always a recommended procedure.

    Anyway, hope to have helped, have a great day ahead.

    Best,
    Jon

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.