We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11030
    • 21 Posts
    Hey Guys!,

    Before i explain my noob problem, i’d just like to thank the guys responsible for ModX!. Seriously, its easily the best CMS available, its simply outstanding!.

    Anyways back to my noob problem embarrassed

    Well i’ve been playing around with ModX all day and was wondering how you get the WebSignup and Jot Snippets to work correctly?, I have no problem calling them into my content but when i submit the information, they try to load just the documents alias’s name.

    For example, if you visit my test website below, you’ll notice the WebSignup script.
    http://www.pixelisedesigns.co.uk/register.html

    after submitting the form on that page, the cms will try and load http://register.html/ and nothing is submit.

    I know this is probably a noob question, and i’ll no doubtively get laughed at, but any help would be appricated.

    Thanks!

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Do you have the snippets called cached [[ ... ]] or uncached [! ... !]

      If a document is cached and the snippet call is also cached, then the entire cached document will be served; snippets won’t get run again. But in the case of a form, you need to have the snippet run again so the submission POST can be processed! If a snippet is uncached, even if the rest of the document is cached the snippet will get run, thus processing the POST.
        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
        • 11030
        • 21 Posts
        hey thanks for the quick response.

        I’ve changed them to uncached, and even changed the properties of the page to uncachable. but the same problem is still persisting.

        After clicking submit, the cms tries to load http://register.html/ and the form information is not submitted.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          How are you specifying the action for the form? In the page source it’s
          action="//register.html"
            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
            • 11030
            • 21 Posts
            i think i need this explained to me in laymans terms. Bare in mind i have no knowledge or experience with Mod X other than today. I have no idea how i am specifying the action, or what the action is or should be.

            Basically, i’ve installed the CMS today, looked through the features, read a few articles of the documentation and discovered the use of Snippets. I decided to test a few of them out, by basically calling them into my content. I’ve mad no changes to the coding of the snippet or anything else.

            Sorry about the confussion
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Can you paste your form code from the chunk here then? Or at least the line with the <form ... > tags. Usually the action is [~[*id*]~] to have the form post to the same page so the snippet can process the POST values.

              The [~ ... ~] tags tell MODx to make a proper URL out of a document ID. In this case we use [*id*] to get the ID of the current page.

              You also might want to check your template to see if it has the <base href="[(site_url)]"></base> in the HTML head.

                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
                • 11030
                • 21 Posts
                The only code i use is the WebSignup Snippet. I simply called the snippet into the page register using [!WebSignup!]. Nothing has been edited or changed. I’m guessing your familiar with the coding of the websignup snippet, so i think its pretty pointless including it here.

                I didn’t even know the form tag was required. I simply thought you called the snippet into the content and it would work, do i have to use a form tag, and how would (and also where) would i implement this.

                Again, sorry about all this, i understand this must be very frustrating for you.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Ok, sorry, it’s been a while since I used default forms. The default form for WebSignup is in the assets/snippets/weblogin/websignup.inc.php file on line 177. It looks like you need to put
                  <base href="[(site_url)]"></base>

                  in your template’s head; a good place is right after the <title>...</title> tags.
                    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
                    • 11030
                    • 21 Posts
                    Ah thanks alot, including the base coding and replacing the action segement worked!. Thanks alot!, i really appricate it.

                    althought, i would have thought the default coding would have already included this coding, surely i’m not the first person to have this problem?

                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      I suspect most people use a custom chunk tpl for the form. Also the suggestion to add the base tag to the template head is fairly common for solving a number of problems.
                        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