We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39501
    • 163 Posts
    I have setup a vanilla installation of Formz.

    I first applied some work arounds to make formz usable. these were:

    Stop valid field data from disappearing after the form has been submitted but returns errors

    In fieldTypesTpl I changed the input value from
    value="[[+current_value:default=`[[+default]]`]]"

    to
    value="[[+fi.[[+name]]]]"


    Show validation messages on the front end which were entered via the Formz CMP

    I replaced
    [[+error:notempty=`<span class="[[+error_class]]">[[+error]]</span>`]]

    in fieldWrapTpl with the below to output the error messages:
    [[!+fi.error.[[!+name]]]]


    The final problem!

    What I can't understand, is why the error message placehoders are empty inside the inputs (specifically [[+class]] & [[+error_class]]). Also, why don't the default error placeholders work?
      <input type="[[+type]]" name="[[+name]]" id="[[+key]]" value="[[+current_value:default=`[[+default]]`]]" class="[[+type]] [[+class]][[+error_class]]" size="[[+size:default=`40`]]" />
    


    If this worked as intended, if a user made a mistake with the form, I could highlight the input that needs correcting via a css class name ...

    Not sure if this is a Formz, FormitFastPack or Formit issue - any help would be appreciated!!! [ed. note: jonleverrier last edited this post 8 years, 5 months ago.]
      • 40249
      • 31 Posts
      i've got the same kind of error on a modx 2.3.6 install.
      works on an older install without any problems.
      i get errors when installing formz.

      check my issue in the github repo
      https://github.com/Adido/formz/issues/24
        • 39501
        • 163 Posts
        Quote from: degoya at Nov 29, 2015, 10:30 PM
        i've got the same kind of error on a modx 2.3.6 install.
        works on an older install without any problems.
        i get errors when installing formz.

        check my issue in the github repo
        https://github.com/Adido/formz/issues/24

        Just for clarity - I'm running MODX 2.4.1
        Formit 2.2.7
        FormitFastPack 1.1.0

        Also, could potentially be a FormitFastPack issue, as thats the glue that holds it all together

        Not sure this is a recent problem sad

        http://stackoverflow.com/questions/22159855/modx-formz-does-not-keep-the-submitted-values-neither-its-error-messages
        http://forums.modx.com/thread/89603/formz-formit-and-formitfastpack-problem-with-caching-placeholders-not-set
        [ed. note: jonleverrier last edited this post 8 years, 5 months ago.]
        • I haven't had time to look at this in depth (I am the author of FormitFastPack), but this looks like a caching issue.

          I have noticed a caching bug in at least the 2.4.2 MODX Revolution release. Some UNcached snippets and placeholders inside of CACHED chunks are being cached.

          Try editing the resource this is happening on, going to the Settings tab, and unchecking "Cacheable". Save the resource and test. Is the problem still happening?
            WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area
          • Also, the [[+current_value]] and [[+error]] placeholders are generated by the [[!field]] snippet each and every time the page is loaded from the [[!+fi.FIELDNAME]] and [[!+fi.error.FIELDNAME]] placeholders. If you need to replace either of those placeholders, that indicates a much bigger problem (such as caching).

            So, try calling the page uncached as I mentioned in my other reply. If that doesn't work, I'd love to help troubleshoot if you can set up a demo site somewhere that I can examine.
              WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area
            • Quote from: yoleg at Dec 23, 2015, 06:49 PM
              I have noticed a caching bug in at least the 2.4.2 MODX Revolution release. Some UNcached snippets and placeholders inside of CACHED chunks are being cached.

              I filed a bug with MODX with a better description of the caching problem: https://github.com/modxcms/revolution/issues/12835
                WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area