We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36805
    • 354 Posts
    I use this approach for multilanguage form labels: http://wiki.modxcms.com/index.php/Multilanguage_eForm.

    It works fine for localisation of the label texts. However for validation messages it does not work. Consider the following form field:
    <ol>
      <li>
         <label for="firstname">[+label_firstname+]<em>*</em></label>
         <input class="field" type="text" id="firstname" value="[+firstname+]" name="firstname" eform="[+prompt_firstname+]:string:1" />
      </li>
    </ol>
    

    While [+label_firstname+] gets replaced, [+prompt_firstname+] does not have any effect. I think it is a parsing problem. Is there another way or workaround I could try?

    EDIT: i found out something curious: If I use the placeholder in a hidden input before the actual text input it shows up. ie:
    <ol>
      <li>
         <label for="firstname">[+label_firstname+]<em>*</em></label>
         <input type="hidden" value="[+prompt_firstname+]" />
         <input class="field" type="text" id="firstname" value="[+firstname+]" name="firstname" eform="[+prompt_firstname+]:string:1" />
      </li>
    </ol>
    

    instead of the hidden field a bogus snippet call also works i.e.
      [[bogus? &p=`[+prompt_firstname+]` ]] />