We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22815
    • 1,097 Posts
    This is an auto-generated support/comment thread for FormProcessor.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    Generic form processor; handles required fields, sends submissions via email and (optionally) saves submissions to the database.

    Previous support thread:
    [SNIPPET] FormProcessor
    (see below for the pertinent parts)

    Note: I didn’t write this, I just added it to the Repo. It was written by aNoble.

    Important parts of the previous support thread

    Quote from: aNoble at Jan 27, 2006, 06:30 AM

    Let me give one quick disclaimer for those who ran into this thread looking for a simple forms solution: this is probably not the solution for you. This snippet is designed for experienced developers who are already comfortable creating HTML forms.

    The purpose behind this snippet is to save as much time as possible in the form development process without restricting your capabilities in any way. With this snippet you are not limited in the HTML, CSS, Javascript or anythig else you want to use to create your form, you can even use a WYSIWYG editor. You can have custom submission confirmation pages, emails, custom data send emails and you can use placeholders and snippets in any of these to allow you even more flexibility.

    I may eventially write a form generator that would create HTML forms to work with this snippet but for the time being the HTML is up to you and FormProcessor will take care of pretty much everythnig else.

    Quote from: davidm at Jan 27, 2006, 08:16 AM

    Just a thing people : don’t just download and start playing with the snippet (like I did rolleyes ), read the documentation first => it’s pretty clear and gives a good idea how to start with FormProcessor.

    For those who want to give extra care toward forms validation and accessibility, I advise you to read this article from webstandards.org : Accessible HTML/XHTML Forms. You’ll also learn much about forms if you begin with them. Very nice tutorial....

    Believe me, it will save you time and eventually it will save time for Adam grin

    Quote from: aNoble at Apr 21, 2006, 07:45 PM

    Quote from: Duane at Apr 21, 2006, 07:36 PM

    Where in the database are the new tables created?

    It should be submissions and submission_data (prefixed with whatever MODx table prefix you might be using of course). Just so you know the data is not stored in a human friendly way. The method for storing the data is meant to be flexible. It is definitely not designed for performance or usability. However, if you can wait ’till tomorrow (or maybe tonight) you can use the new module which does present the data in a very user friendly format.
      No, I don't know what OpenGeek's saying half the time either.
      MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
      Forum: Where to post threads about add-ons | Forum Rules
      Like MODx? donate (and/or share your resources)
      Like me? See my Amazon wishlist
      MODx "Most Promising CMS" - so appropriate!
      • 22202
      • 23 Posts
      Hi,

      How can i have multiple recipient email for the form ?
        • 31654
        • 238 Posts
        Hello All
        Just thought someone may like to use my form of their website.

        It’s completely accessable to level two DDA complience. It would be DDA level three if I could work out how to add a value to the input fields without corrupting the FormProcessor.

        I’m trying to get this to work:
        value="Enter your eMail here" onfocus="if(this.value=='Enter your eMail here')this.value=''" />
        


        You’ll need to format it with CSS

        <form name="contact" action="[~[*id*]~]" method="post">
        <fieldset>
        <input type="hidden" name="send_to" value="FormProcessor" />
          <legend>eMail Form</legend>
          <ol>
            <li>
              <label for="your_name">Your Name</label> [+Name-required_message+]<br />
              <input type="text" id="your_name" size="27" class="[+Name-required_class+]" name="Name" value="[+Name-value+]" />
            </li>
            <li>
              <label for="your_email">Your eMail</label> [+eMail-required_message+]<br />
              <input type="text" id="your_email" size="27" class="[+eMail-required_class+]" name="eMail" value="[+eMail-value+]" />
            </li>
            <li>
              <label for="your_message">Your Message</label> [+Message-required_message+]<br />
              <textarea cols="25" rows="10" id="your_message" class="[+Message-required_class+]" name="Message">[+Message-value+]</textarea>
            </li>
            <li>[+How_did_you_find_us-required_message+]
              How did you find this website?
            </li>
            <li>
              <label class="radio-label" for="search_engine">Search Engine</label>
              <input  type="radio" id="search_engine" name="How_did_you_find_us" value="Search Engine" [+How_did_you_find_us-checked-Search_Engine+]/>
             </li>
            <li>      
              <label class="radio-label" for="another_website">Another website</label>
              <input  type="radio" id="another_website" name="How_did_you_find_us" value="Another website" [+How_did_you_find_us-Another_website+]/>
            </li>
            <li>      
              <label class="radio-label" for="other">Other</label>
              <input  type="radio" id="other" name="How_did_you_find_us" value="Other" [+How_did_you_find_us-Other+]/>
            </li>
          </ol>
        </fieldset>
              <div class="send">      
              <input type="hidden" name="send_to" value="FormProcessor" />
              <input type="submit" class="FSF_submit" alt="submit" />
              </div>
        </form>


        The CSS I use is:

        /*
        ---------------------------------------
                   Form Formatting
        ---------------------------------------
        */	
        	
        #page_right_col label {
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        	color: #313131;
        	font-weight: bold;
        	position:absolute;
        	z-index:1;
        	padding: 0em;
        	}	
        .radio-label {
        	margin: 0.1em 0 0 2em;
        	}	
        #page_right_col input, #page_right_col textarea {
                border: 1px solid #CCCCCC;
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        	font-size:1em;
        	padding: 0.3em;
        	}	
        #page_right_col fieldset {
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        	font-size:0.7em;
                border: 0;
        	padding:0;
        
        	}	
        #page_right_col ol {
        	list-style: none;
        	padding:0;
        	margin:0;
        	}		
        #page_right_col li {
        	list-style: none;
        	padding:0;
        	margin:0;
        	}	
        .error {
        	display:block;
        	width:195px;
        	position:absolute;
        	z-index:2;
        	margin-bottom:-20px;
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        	font-size: 0.9em;
        	padding: 0.3em;
        	color:#fff;
        	font-weight:bold;
        	background: url(../images/form_error.jpg) repeat-y;
        	} 
        .send {
        	text-align:rightr;
        	color:#990000;
        	text-align:right;
        	background:#DADAE0;
        	}	
        


        Let me know if you have any questions or a solution to the value issue... contact me via my website (in the footer of this message)
          Web Development, Web Hosting & Search Engine Marketing by:

          Vitalized | UK
          w. www.vitalized.co.uk

          Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

          Vitalized | Australia
          w. www.vitalized-australia.com.au

          Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible
        • Any examples of the form in action you could link us to?
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 31654
            • 238 Posts
            Yes, any page on my web site

            I’m also trying to find a way to secure the form from spammers, I’m receiving about 10 - 20 email a day from spambots using my form.
            I tried adding some radio buttons which have to be clicked to submit the email but it’s only stopped the spam by a third... cleaver damned spambots!

            I guess a CAPTCHA is the only soluton.. Isn’t it?


              Web Development, Web Hosting & Search Engine Marketing by:

              Vitalized | UK
              w. www.vitalized.co.uk

              Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

              Vitalized | Australia
              w. www.vitalized-australia.com.au

              Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible
            • BTW, that’s a very well done site. laugh

              (Off topic:
              I see you too are suffering from the Safari drop down over flash flicker, which IE and FF get totally right. Do you know if that’s registered in Apple’s bugtracker?)

              I really like your validation failure message implementation. Any link to DDA level-compliance definitions for those of use not familiar with them (I suppose that’s a British legal requirement)?
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 31654
                • 238 Posts
                First off... Thanks for the complement it’s only about half way done!... I have some very eciting features on the way!

                OFF TOPIC:
                I’m still working on the drop down. I’ve got it working on safari 1.3.2 (OSX 10.3.9 - Panther) but it won’t work on the new version in Tiger (I forget the version number)... No, I haven’t registered in Apple’s bugtracker... Slap my hand!
                I’m going to crack it and then I’ll be famous all over the internet!.. LOL... well I know many people will want to use my code anyway.

                KIND OF ON TOPIC
                Yes, it’s a british lagal requirement for websites. Validating your HTML in the W3C validator is level one of three levels.
                This website is absolutly amazing... If you think your website is standards complient then try putting it through here:
                http://webxact.watchfire.com/
                Then have a look at the accessablity tab... Level three is the goal for perfect markup!



                  Web Development, Web Hosting & Search Engine Marketing by:

                  Vitalized | UK
                  w. www.vitalized.co.uk

                  Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

                  Vitalized | Australia
                  w. www.vitalized-australia.com.au

                  Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible
                  • 17802
                  • 190 Posts
                  That’s one fine looking website. (And you’re in Exeter! I used to live there! grin)
                  But, on topic: I like the way the text in the form submit button is being translated, very clever! But the cursor doesn’t change into a hand on mouse-over, which isn’t great for usability. I’m on a Win XP pc/Firefox.
                    Thanks for MODx - I love it!
                    • 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
                      • 31654
                      • 238 Posts
                      What a lovely bunch of people that seemed to have gravitated towards MODx.
                      I must say this is all starting to go off topic and I’ve already been politely told off by PaulGregory for other posts wink

                      But quickly... Thanks for the CSS pointer tip, as I said before my sites only half complete It’s not the CSS I’m/we’re concentrating on, it’s the form.

                      BACK ON TOPIC
                      If we could find a way to get the value changed without corrupting the FormProcessor it would be great!... It’s the only bit that’s stopping my site from DAA level three and (almost) perfect code!
                      value="Enter your eMail here" onfocus="if(this.value=='Enter your eMail here')this.value=''" />


                      (Sorry PaulGregory, I’m trying to keep it on topic! smiley)

                        Web Development, Web Hosting & Search Engine Marketing by:

                        Vitalized | UK
                        w. www.vitalized.co.uk

                        Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

                        Vitalized | Australia
                        w. www.vitalized-australia.com.au

                        Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible