I using drupal 7 for my website. I created one feedback form using webform and Internationalization for both English and Japan version.

It works fine, but the error message for Feedback is required. is showing 「ご意見・ご感想」は必須項目です。 where translation for Feedback is ご意見・ご感想. Here I need to show the error message 「本文メッセージ」は必須項目です。.

How can I do this? Is there any way to do this? Please help me.

  • You want the error message to be 「本文メッセージ」は必須項目です。 but the translation for feedback is ご意見・ご感想? Why not just change the feedback translation to 本文メッセージ? – Patrick Kenny Dec 4 '17 at 10:11
  • No I need feedback translation as ご意見・ご感想 and error message as 「本文メッセージ」は必須項目です。 – user4026 Dec 4 '17 at 10:14

By default, Drupal (and Webform) show the error message as Field_name is required, so if you want to show an error message that uses something other than field_name, you will have to override/write your own validation function.

The Webform Validation module may be of assistance here, particularly the code examples for custom validation hooks.

P.S. "本文メッセージ" is probably a mistranslation; it most likely should be flipped ("メッセージ本文", "message body").

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy