We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29076
    • 615 Posts
    Thanks for the answer. smiley

    OK, I bought one licens, for testing on a local xampp site. I didn’t succeed on getting it to work in MODx manager yet, but everything else is working well. And as long as I can reach the MachForms-manager and make my forms I’m happy. For the moment. I’ll see if I can get it to work within MODx manager when the site goes public.
      I think, thererfor I am! But what I am, and why...?
      • 32142
      • 19 Posts
      Quote from: Sylvaticus at Sep 28, 2009, 12:45 PM

      Thanks for the answer. smiley

      OK, I bought one licens, for testing on a local xampp site. I didn’t succeed on getting it to work in MODx manager yet, but everything else is working well. And as long as I can reach the MachForms-manager and make my forms I’m happy. For the moment. I’ll see if I can get it to work within MODx manager when the site goes public.

      There is some good news in regards to this.

      I have had Machform running for a couple of months now on my within the MODx manager, without any problems so far.
      Recently whilst browsing the site, I discovered that, I could easily log into the form manager without "Username" or
      "Password" as the old method of getting it to run within the manager was basically a crude hack of the index.php file which
      forced the use of the formbuilder within Modx via manage_form.php

      What does this mean..???
      It means that anyone, who logs onto your site and fills out for example your contact form & receives a copy of their message
      could easily copy the URL & make some changes with the link from view.php to manage_form.php & would be able to use your form manager
      or could erase or do worse to your forms manager.....!!!!!!!!!!! Or a hacker browsing your directory could also stumble across your files
      & make use of that, or even worse situations may arise from this weakness.....!!!!!!!!!!!!!!!!!!!

      That is not such a good idea.
      So I WILL advise anyone to follow the excellent example of Susan Ottwell’s Dadamail integration with Modx to get their mach form running
      from within the manager.

      In under 10 minutes I have all my MachForms running within the manager. Having to login into the form manager adds some measure of
      security for me.

      Copy exactly the same procedure as Susan did & change all links & references to suit your MACHFORM integration.
      Here is the link to Susan’s tutorial.
      follow exactly the same example & just change all URL links & your MACHFORM should be up & running in no time at all.

      http://modxcms.com/forums/index.php?topic=20654.0


      Thanks.

      Webman
        • 5699
        • 46 Posts
        computersolutions.cn Reply #43, 14 years, 4 months ago
        Actually, I did mention that in post #7.

        I’ve added the manager call check back in, as sotwell’s post had the line I was looking for.
        Just add this to the top, and you should be ok again.


        if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the MODx Content Manager instead of accessing this file directly.");



        I’ve amended my example also.

        Lawrence.
          • 5699
          • 46 Posts
          computersolutions.cn Reply #44, 14 years, 3 months ago
          Here is a Modx version of the call snippet which is more modular. I still assume that MachForms is installed in the manager folder in /manager/MachForms
          If not, change $mathFormPath appropriately.


          <?php
          
          //Snippet Name: ShowForm
          //Version 1.0
          
          $machFormPath = "manager/MachForms/";
          
          $docid = isset($id) ? $id : "";
          if(empty($docid)) return "";
          
          require( $modx->config['base_path'] . $machFormPath . "machform.php");
          	$mf_param['form_id'] = $docid;
          	$mf_param['base_path'] = $modx->config['site_url']. $machFormPath;
          	display_machform($mf_param);
          ?>


          Call as follows

          [[ShowForm? &id=`1`]]
          Change id to the id number of the form you want to display.

            • 5699
            • 46 Posts
            computersolutions.cn Reply #45, 13 years, 2 months ago
            Tips and Tricks with MachForm and MODx.



            For those who were having issues with Form posts going to the home page, the issue is that you have a base href added to your template.

            If you want form submission to work, you cannot use this
            eg

            If your template includes something like:

            <base href="http://somesite.com/"></base>


            urls like a href="#something" will redirect to your base href declaration, so the form post would go to http://somesite.com#something, instead of the current page.


            You will need to amend your templates accordingly, and any other urls in your template to use absolute url’s, so that MachForm will work.

            If you do this, then MachForm will work fine with Friendly URL’s on or off.
            Just remember that all url’s need to be absolute so you will need to add proper paths to images, url’s and links.

            eg

            a href="[~id~]"  would need to be referenced as a href="/[~id~]"

            • Just trying to integrate machform with Revo and using the advanced code does not work regardless if the base tag is used or not.

              Would be great to see someone being able to integrate something like this in to MODx.
                Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                AugmentBLU - MODX Partner

                BLUcart - MODX Revolution E-Commerce & Shopping Cart