We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16429
    • 254 Posts
    Ok, ok, ok... after days looking at a blank page, I decide to post and after a couple of hours I succeeded in creating my form rolleyes

    OpenGeek, there are in your .zip some chunks with closing < /label > tags near the end of the the fieldset (like in MakeForm-InputText.chunk.html). Better fix it.
      kudo
      www.kudolink.com - webdesign (surprised?)

      [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: kudolink at May 25, 2006, 07:15 PM

      Ok, ok, ok... after days looking at a blank page, I decide to post and after a couple of hours I succeeded in creating my form
      That’s always how it happens kudolink. Welcome to the MODx community, and hope you find the tool useful, once you understand the code (sorry, I think I often see things that aren’t obvious as the most obvious, and vice versa undecided ).

      Quote from: kudolink at May 25, 2006, 07:15 PM

      OpenGeek, there are in your .zip some chunks with closing < /label > tags near the end of the the fieldset (like in MakeForm-InputText.chunk.html). Better fix it.
      As for the chunks, those are there so you can make the elements appear as you want to. The forms I was creating needed those label tags done that way, so that’s how I contributed it. Feel free to modify them how you see fit, and you can even upload them here for people to use with MakeForm, if you feel so inclined.

      Meanwhile, I’m busy finishing up the core persistence framework for the next generation MODx, including a more advanced version of MakeForm (and same for MakeTable).
        • 16429
        • 254 Posts
        Quote from: OpenGeek at May 25, 2006, 08:01 PM

        That’s always how it happens kudolink. Welcome to the MODx community, and hope you find the tool useful, once you understand the code (sorry, I think I often see things that aren’t obvious as the most obvious, and vice versa undecided ).
        Modx is THE tool me too was waiting for. Thanks.

        Quote from: OpenGeek at May 25, 2006, 08:01 PM

        As for the chunks, those are there so you can make the elements appear as you want to. The forms I was creating needed those label tags done that way, so that’s how I contributed it. Feel free to modify them how you see fit, and you can even upload them here for people to use with MakeForm, if you feel so inclined.
        I thought about it, but I noted not all the chunks have the same kind of structure so I thought about an error, I’m sorry, no teaching was intended!
        Perhaps I’ll post a uniform version.
        And now the MakeTable one grin

        Thanks OpenGeek
          kudo
          www.kudolink.com - webdesign (surprised?)

          [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]
          • 11975
          • 2,542 Posts
          Hi,

          Your makeForm class is definitely useful.
          I’m rebuilding all my forms with.
          I’ve had to make some changes to handle multiple checkbox.(sorry if it doesn’t make sense)

          Anyway, it would be awesome if we could manage input type=file.
          I’m trying to add this feature but my php is poor

          Do you plan to add this functionality in the next release?

          :-)

            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: heliotrope at Jun 29, 2006, 07:55 AM

            Hi,

            Your makeForm class is definitely useful.
            I’m rebuilding all my forms with.
            I’ve had to make some changes to handle multiple checkbox.(sorry if it doesn’t make sense)

            Anyway, it would be awesome if we could manage input type=file.
            I’m trying to add this feature but my php is poor

            Do you plan to add this functionality in the next release?

            :-)

            It should be quite easy actually to add support for that input type. I’ll look at adding it to my new rendition of the MakeForm class, which I’ve refactored for the OR/M layer I am developing to power the core of the next-generation MODx; then I can easily port it back to this version for you. Give me a day or two to finish up the suprise I’m working on, and then I’ll get to it.

            As is however, you should be able to handle it by simply adding a template for the file input type with the appropriate placeholders for the attributes it needs; then defining key/value pairs of those attributes in your form element array should work just as is does with the other types.
              • 11975
              • 2,542 Posts
              Thx for replying.

              for now I’ve been able to add this "new" type(file) to the class.
              It was "easy" because of the nice code you provided.

              Actually, I’ve got trouble to handle the posted file.
              As I’m not a developper I’m not sure which way is the best.
              Do I have to create new methods for the makeform class to manage the specific type=’file’ and store them according attributes (as max_file_size, path_to_store, allowed_extension) given in getSampleData function?

              or is it better to make it by handling $_FILES values posted by the form within the snippet and so not to have to modify the makeform class.

              Hope that makes sense smiley

              P.S: I definitely have to improve my english. smiley
                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 11778
                • 6 Posts
                Oh My Gosh i’m just knocked out in front of my PhpMyAdmin !
                I was tryin MODx for 2-3 hours when i found your script .... and It worked at first time !
                Thank you !

                  • 6192
                  • 20 Posts
                  It must be me, but all I have follow all the instructions, the sample table was created, but no data was inserted into the sample table. Anyidea why?