We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23050
    • 1,842 Posts
    Hi Metaller,

    You can use the requiredClass parameter in order to add a class to a field required but not filled wink
      • 19164
      • 1,215 Posts
      RTFM, i’m understand smiley

      Thanks for your help and so quick answers.
        DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

        Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

        [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Sorry about that; I couldn’t recall what the parameter was, and was in a hurry, and figured to at least give the reply that it is possible and there’s a parameter to do it.
        &invalidClass=`invalidValue`
        or any value you like.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 19164
          • 1,215 Posts
          Thank you, Susan. It’s realy important for me that it is possible as fact.
            DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

            Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

            [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Just looking at the listings of available parameters and placeholders for most of the major snippets (Wayfinder, Ditto, eform, etc) opens up all kinds of fascinating possibilities! It’s well worth the time.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 22797
              • 134 Posts
              I’m using version 1.4.4 and I tried to use the integer data type, but got an unresolvable error. I looked in the source code and found out that the switch case for integer was unfinished. It simply says
              case "integer" :
              and nothing else. I went into the code and copied the code from the line below (for "float") so that it would at least check to see if it is a number. Here’s what I did:
              switch ($datatype){
              						case "integer": 
              							if (strlen($value)>0 && !is_numeric($value)){
              								$vMsg[count($vMsg)]=$desc . $_lang["ef_invalid_number"];
              								$rClass[$name]=$invalidClass;
              								}
              								break;
              						case "float":
              							if (strlen($value)>0 && !is_numeric($value)){
              								$vMsg[count($vMsg)]=$desc . $_lang["ef_invalid_number"];
              								$rClass[$name]=$invalidClass;
              							}
              							break;
              


              It would be nice if this (or something better) could be incorporated into the code so that the integer validation would actually work.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I believe that was done deliberately, so that all integer input would be processed by the float case. In a switch statement anything without a break will just drop down to the next case.
                switch ($letter) {
                    case 'a':
                    case 'b':
                    case 'c':
                        echo "A or B or C";
                        break;
                    case 'd':
                        echo "D";
                        break;
                etc...
                }
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 22797
                  • 134 Posts
                  Maybe so, but using the integer data type didn’t work until I added that to the code. Maybe something else was going on, but this worked.
                    • 30223
                    • 1,010 Posts
                    It is as Susan said the float and integer types share the same bit of code. I’d be rather surprised if your form started working because of your little code addition and I’d try to find out what else was going on.

                    Just out of curiosity, what was the unresolvable error?
                      • 22797
                      • 134 Posts
                      The error message that was invoked was "Invalid or insecure entries were detected in your form", which, from looking at the code, happens when there is an attempt to inject suspicious HTML into one of the fields.

                      Once I knew the form was working, I went ahead and reverted to the original code in eform and the form still works, so, as you suspected, there must have been something else going on. I’m not sure what it would have been, but it works now, so I’m not going to bother to try to recreate the original error.

                      Thanks for your response.

                      This discussion is closed to further replies. Keep calm and carry on.