We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32858 ☆ A M B ☆
    • 2 Posts
    Um, I’m gonna open this thread for posting what I’ve done to get ditsformsaver (0.0.1alpha) to work and save your form field values. Perhaps you tried to install the package and add a form, but you got ’error on saving form’. And me too, hence I looked into the MODx log and I realized that the tables didnt exist, so I just went create them.
    Below the post is the attachment included the tables creation sql. Just use your phpMyAdmin or SQLBuddy to import them into your modx database after installing the ditsformsaver package (0.0.1alpha).
    Then do some steps they guided:
    - Component>Ditsformsaver
    - Add a form, give a name (whatever), give some field names that you want to save values to database (seperated by commas), after that, REMEMBER your ditsform ID shown in the left column of the table.
    - Go to your form script, in the form you have to add a hidden field: <input type="hidden" name="dfsForm" value="yourDitsFormID" />
    - In your FormIt call, add ditsformsaver to your hooks parameter, eg: &hooks=`recaptcha,spam,email,FormItAutoResponder,ditsformsaver,redirect`
    (Of course, for testing, we can only use: &hooks=`ditsformsaver`)

    (remember those hooks is executed by sequence (thanks Bob for your guide), so putting your ditsformsaver action after we send emails is safer, or you want to create an activate resource then make a url in the email which require user to visit the activate resource to register again with their filled values.)

    After you finish those steps, go and submit your form several times to test if the form work.

    Now you can either export your form field values by right click and select export to CSV.

    Comment back if it works for you. Thanks.
      • 36481
      • 2 Posts
      Hi, can you post the SQL Tables?
        • 36457 ☆ A M B ☆
        • 100 Posts
        Here one I got not so long ago from this post. You can use it.
          • 36481
          • 2 Posts
          Hey Nepheuse, thank you so much - it worked
            • 36547
            • 6 Posts
            Had to leave a comment, got the .spl file uploaded and it's working like a dream. Thanks so much!
              To infinity... and beyond!
              • 35308
              • 7 Posts
              thank you very much for the addon. Have to get hands into the code but worth giving it a go. smiley
                • 38542
                • 3 Posts
                I can't get this to work properly in 2.1.3

                Has anyone had any success?

                I get

                Deprecated: Assigning the return value of new by reference is deprecated in /../core/components/ditsformsaver/model/excelwriterxml/ExcelWriterXML.php on line 168 Deprecated: Assigning the return value of new by reference is deprecated in /../core/components/ditsformsaver/model/excelwriterxml/ExcelWriterXML.php on line 200

                When trying to Export to XLS.

                Any ideas, anyone?

                Thanks - Jon
                  • 38542
                  • 3 Posts
                  Just to answer my own post in case anyone else gets the same problem...

                  I got it working by going into the ExcelWriterXML.php and changed '&new' to 'new' on lines 168 and 200.

                  Also note that the 'Export to XLS' option actually exports to XML...
                    • 36457 ☆ A M B ☆
                    • 100 Posts
                    Quote from: zerothehero at Feb 03, 2012, 06:13 AM
                    Just to answer my own post in case anyone else gets the same problem...

                    I got it working by going into the ExcelWriterXML.php and changed '&new' to 'new' on lines 168 and 200.

                    Also note that the 'Export to XLS' option actually exports to XML...

                    Hi, I think the option to export to XLS not really working for now, so I suggest you to use export to CVS, then from Excel or Libre Cal you can use import option to import the data you need.
                      • 38542
                      • 3 Posts
                      Thanks for the reply.

                      By making those two code changes, I did manage to get it to export an XML file, which can be read into the Open Office 'Calc' program (poor man's Excel!) successfully. I don't have a more recent version of Excel than 2003, but am trying to find someone with a copy who can try to import the file on that as well, just for testing.