We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30223
    • 1,010 Posts
    MODx tags are evaluated in documents. The report chunk is not processed as a document but as an email template (by eForm) and as a consequence has no idea about [(site_name)].

    One way of resolving this in your case is to add a hidden field to your form template like this:
    <input type="hidden" name="site_name" value="[(site_name)]" />

    and set a [+site_name+] place holder in your report.
      • 29076
      • 615 Posts
      Just a small wish: can someone please start new threads here instead of answering this one. There is over 330 replies here now, and it would be mutch easier for the "rest of us" to ceep track on problems/answers in new threads.

      Thanks. wink
        I think, thererfor I am! But what I am, and why...?
        • 17691
        • 22 Posts
        Hi everybody!

        Now i also tested the new version of eForm and it’s very great!!! wink

        But i have big troubles with dropdown boxes :’( I still get following errors:
        First time when i send the form:
        name_of_select_box: Incorrect value

        When i make a change at the select box then i get the same error as above and also this one:
        [undefined]: Tampering attempt detected!

        The select box(es) are no obligation fields!!!

        I search here in this big thread but i don’t found a solution for my problem. Can anybody help me?
        Thx a lot!!

        Lupo
          • 17691
          • 22 Posts
          Hi!! cool

          I think i can solve the problem the first error message ([undefined]: Tampering attempt detected!). I have a hidden field in my form. Now i delete this in my form code and the error is solved. But this can also not the solution huh

          But i still until get the error message "name_of_select_box: Incorrect value" when i send the form. But why???

          My code looks like this:

          <select class="selectDay" name="day">
          [[generate_days]]
          </select>


          The options elements get generates in a snippet because i don’t can insert PHP code in the chunk sad

          Thx...
            • 5798
            • 22 Posts
            Quote from: TobyL at Mar 15, 2007, 11:42 PM

            MODx tags are evaluated in documents. The report chunk is not processed as a document but as an email template (by eForm) and as a consequence has no idea about [(site_name)].
            Thanks for that information.
            Quote from: TobyL at Mar 15, 2007, 11:42 PM

            One way of resolving this in your case is to add a hidden field to your form template like this:
            <input type="hidden" name="site_name" value="[(site_name)]" />

            and set a [+site_name+] place holder in your report.
            I did that trick, now i get the same message as "lupo1" describes in his posting above: [undefined]: Tampering attempt detected!

            Strange. rolleyes

            BTW: I too would appreciate a subforum for eForm since it’s getting really hard to find help using the site search. The search finds a posting in the middle of the thread with the search words, hence the whole thread gets spit out on nearly every search for eForm topics... sad
            • Quote from: CoreBit at Mar 16, 2007, 10:24 AM

              BTW: I too would appreciate a subforum for eForm since it’s getting really hard to find help using the site search. The search finds a posting in the middle of the thread with the search words, hence the whole thread gets spit out on nearly every search for eForm topics... sad
              Like this one?
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 1511
                • 144 Posts
                Quote from: lupo1 at Mar 16, 2007, 09:28 AM

                But i still until get the error message "name_of_select_box: Incorrect value" when i send the form. But why???

                My code looks like this:

                <select class="selectDay" name="day">
                [[generate_days]]
                </select>


                The options elements get generates in a snippet because i don’t can insert PHP code in the chunk sad

                Thx...

                I had the same problem. You cannot use a chunk or snippet inside eForm for populating options. sad
                See http://modxcms.com/forums/index.php/topic,12770.0.html

                  • 5798
                  • 22 Posts
                  Quote from: rthrash at Mar 16, 2007, 11:19 AM

                  Quote from: CoreBit at Mar 16, 2007, 10:24 AM

                  BTW: I too would appreciate a subforum for eForm since it’s getting really hard to find help using the site search. The search finds a posting in the middle of the thread with the search words, hence the whole thread gets spit out on nearly every search for eForm topics... sad
                  Like this one?
                  THX, i didn’t realize that...(the search function mainly spit out this thread)

                  Any idea to my and lupo1’s problem?

                  Greetings,
                  CoreBit
                    • 30223
                    • 1,010 Posts
                    I did that trick, now i get the same message as "lupo1" describes in his posting above: [undefined]: Tampering attempt detected!

                    Ah, yes,... hidden fields are validated against the values eForm reads at the time it parses the form template... This is a solid way of protecting against tampering with hidden values but it does have it’s drawbacks in cases where the value is set dynamically. The value in that case is not yet set (or set to the literal value "[(site_name)]" in your case) by the time the form is parsed. The value it receives from the posted from is thus different and so eForm throws a wobbly...

                    The trick is to add your own validation rule to the hidden fields affected. For instance if you’re expecting a numeric value within a certain range you could do this

                    <input type="hidden" name="hidden_field" eform="Hidden Field:integer:1::#RANGE 100~300" />


                    If you really don;t know what value to expect you can use a rule like #REGEX /.*?/ which basically allows anything including no value...
                      • 5798
                      • 22 Posts
                      Thanks a lot!

                      <input type="hidden" name="site_name" value="[(site_name)]" eform="Site Name::1::#REGEX /[(site_name)]/" />


                      That did the trick... smiley

                      Greetings,
                      CoreBit

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