We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17052
    • 41 Posts
    Have problem with Jot.

    When i enter in comment field cyrilic (russian) chars and try submit - jot return error message "comment fields empty". But when i put in that field with same content (russian chars) one (or more) english word - comment was added...

    My site using utf8 charset

    what’s wrong?
      • 4195
      • 398 Posts
      ah... the validation only does the a-zA-Z range of characters... disable the validation and it will work. I will adapt the validation for other characters also in the next version... will release tomorrow! thanks.
        Armand Pondman
        MODx Coding Team
        :: Jot :: PHx
        • 17052
        • 41 Posts
        I found "a-zA-Z" in \Jot_1.0.1\includes\phx.parser.class.inc.php

        what code need edit?

        this:
        					case "set":
        						$c = $i+1;
        						if ($count>$c&&$modifier_cmd[$c]=="value") $output = preg_replace("~([^a-zA-Z0-9])~","",$modifier_value[$i]);
        						break;


        or:
        					case "math":
        						$filter = preg_replace("~([a-zA-Z\n\r\t\s])~","",$modifier_value[$i]);
        						$filter = str_replace("?",$output,$filter);
        						$output = eval("return ".$filter.";");
        						break;
          • 4195
          • 398 Posts
          NO no no.. that’s not it! smiley

          Don’t touch the PHx parser file it has got nothing to do with Jot validation smiley


          You have to look in jot.class.inc.php (around line 772) for:
          function validateFormField ( ....
          
          somewhere in here is a switch statement with the three main validations, you need to alter the one of "required"
          
          ... }
          


            Armand Pondman
            MODx Coding Team
            :: Jot :: PHx