Need help with form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jabird60
    Sergeant First Class

    • Feb 2006
    • 57

    #46
    Re: Need help with form

    Hey do you know how to valadate the Felds in a form for like a regastration if you do will you tell me how thank

    Comment

    • navaldesign
      General & Forum Moderator

      • Oct 2005
      • 12080

      #47
      Re: Need help with form

      Originally posted by RPW
      PROBLEM ONE
      I added a text box at the last moment to a form which means that when I get the email of the details the name of person 2 is at the end rather than the start. See below. Does anyone know how to correct this ?

      Values submitted from web site form:
      name1 : Mr A Relative
      address1 : 123 Main Street
      address2 : Main town
      address3 : State
      email : abc******.com
      comments : This is a test RSVP message
      name1_Yes_-_I__can_attend
      :
      Submit : Submit
      name2 : Mrs B Relative
      name2_No_-_I_can_not_attend

      Hello to everyone !

      The procedure is quite simple, and maybe in the next Days i'll post a small tutorial int the Tips & Trics section of the forum.

      Emailng the form data consists of two basic parts:

      1. The html form page, where your form lives
      2. The php file, that proccesses all the form info, eventually performs validation of the fields, gathers some some additional info like IP address, browser version and includes the Server Date and Time (all this if they are implemented in the script), and then creates and sends the email.

      Form fields validation (otherwise called error checking) means that you must give your visitor a message to tell him what he has done wrong, then redirect him BACK to the form. So this involves the creation of auxiliary "error_page.html" page(s). This is what i prefer to do, making usually one page, than changing the error message and saving it under two or three or as many as required, different names. So for every type of error the script redirects the visitor to the appropriate error page.

      At the end, when everything has been checked and works ok, the script creates the email and then sends it to you.

      The line order of the email, can be simply adjusted by puting the email body lines in the correct order. Please be very careful with the . and \n and ; s. A small error can make you lose lots of time.

      You can name the form page, the error pages and the thankyou (or confirmation) pages whatever you want. You may also have only one error page instead of more pages, The important thing is that names in the script are the same as the pages themselves. The same goes for the field names, they must have exactly the names of the form fields.

      A common error is when a field that makes use of a combo box is used, having the first option as "Make a choice". If you give this item any value other than null, the script cannot "understand" that in fact the field has been left empty, so validation is useless in this case.

      PLEASE NOTE, that Pablo's script, as well as his instructions on creating the php page directly in BV, are more than useful and correct, and, also, doesn't require any adaptation, it will process as many and as few fields you might have on your form. If your form doesn't require field validation, GO FOR PABLOS SCRIPT.

      Of course, with a little bit of analyzing the various scripts presented in the forum, you can make a combination of the two.

      ONE LAST BUT VERY IMPORTANT THING:

      Voda servers require SMTP authentication for sending email, because the mail() function is disabled for antispam reasons.

      To overide this problem, the email you use in your script, HAS TO BE AN EMAIL ON YOUR VODAHOST ACCOUNT. Both Pablo's script and The scripts i've provided on the forum, WON'T WORK WITH EXTERNAL EMAIL ADRESSES
      Last edited by navaldesign; 02-08-2006, 08:08 AM.
      Navaldesign
      Logger Lite: Low Cost, Customizable, multifeatured Login script
      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #48
        Re: Need help with form

        Originally posted by quyhurry
        I know the problem cause it happened to me.
        I guess the order of the values appearing on the email received depend on the order when you create the boxes and not on the positions on the form.
        I correct it by deleting all boxes and carefully re-create the boxes according the order that I want them to appear on emails that I receive.
        I don't know if there is another way to do it or not but that's my way)
        Hope this will help
        Quy
        That's correct if you use Pablos's script. If you use a script like mine, it only depends on the line order in the email body creation part, the bottom one).

        If you use Pablo's script, php script and confirmation (or thankyou) page are combined in a single html+php page, which is then published on the server as php. With the ones i presented, the php file is independent, it has to be created and then uploaded on the server, and is invisible to your visitor. After it submits the email, it redirects the visitor to the confirmation (or thankyou page). Names are not important, you can make them whatever you like, the important is that the page name, and the rispective page name in the script, are the same.
        Last edited by navaldesign; 02-08-2006, 12:18 PM.
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • quyhurry
          First Sergeant

          • Nov 2005
          • 76

          #49
          Re: Need help with form

          Originally posted by navaldesign
          That's correct if you use Pablos's script. If you use a script like mine, it only depends on the line order in the email body creation part, the bottom one).

          If you use Pablo's script, php script and confirmation (or thankyou) page are combines ina single html+php page, then saved on the server as php. With the ones i presented, the php file is independent, it has to be created and then uploaded on the server, and is invisible to your visitor. After it submits the email, it redirects the visitor to the confirmation (or thankyou page). Names are not important, you can make them whatever you like, the important is that the page name, and the rispective page name in the script, are the same.
          Wow! Everything is so clear now. Thank you so much Navaldesign.

          Quy

          Comment

          • navaldesign
            General & Forum Moderator

            • Oct 2005
            • 12080

            #50
            Re: Need help with form

            Originally posted by quyhurry
            Wow! Everything is so clear now. Thank you so much Navaldesign.

            Quy
            You're welcome
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment

            • Bird
              Captain

              • Oct 2005
              • 202

              #51
              Re: Need help with form

              navaldesgin, or anyone else that can help me with this.

              On my graphics page, I have several catergories to choose from, there is an order form at the bottom of each page. Lets say there are 20 catergories, and each one has maybe 100 images to choose from, thats a total of 2,000 images! Will the Combo Properties box hold that many? Thats alot to put in and also to make sure they are in their right spot.

              Or can I use the same order form but rename them as order form 1, order form 2, and so on. Then add the images accordingly to each one, so there would only be 100 to add to each one.

              What else would I have to do? Or should I just go ahead and put the 2,000 images name in the one?


              http://www.fromtheheartofangels.com/

              Comment

              • navaldesign
                General & Forum Moderator

                • Oct 2005
                • 12080

                #52
                Re: Need help with form

                Just create two drop down options in your form: category, and image number. We will change the script if necessary
                Navaldesign
                Logger Lite: Low Cost, Customizable, multifeatured Login script
                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                Comment

                • Bird
                  Captain

                  • Oct 2005
                  • 202

                  #53
                  Re: Need help with form

                  Originally posted by navaldesign
                  Just create two drop down options in your form: category, and image number. We will change the script if necessary
                  Thanks navaldesign..
                  I now have two drop down boxes, one for category and one for image. Or should I make it image number?

                  I also made an category_errorpage, now what do I do now? to make it work? and tie in with my email submission?

                  http://www.fromtheheartofangels.com/

                  Comment

                  • navaldesign
                    General & Forum Moderator

                    • Oct 2005
                    • 12080

                    #54
                    Re: Need help with form

                    Just back in town. Please upload the URL, let me know which fields are required, remind me the names of the errpr pages as well as the thankypu page name, and i'll preapare the script tomorrow morning.
                    Navaldesign
                    Logger Lite: Low Cost, Customizable, multifeatured Login script
                    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                    Comment

                    • Bird
                      Captain

                      • Oct 2005
                      • 202

                      #55
                      Re: Need help with form

                      Originally posted by navaldesign
                      Just back in town. Please upload the URL, let me know which fields are required, remind me the names of the errpr pages as well as the thankypu page name, and i'll preapare the script tomorrow morning.
                      http://www.fromtheheartofangels.com/orderform.html
                      ((in this order))
                      category_errorpage.html
                      image_errorpage.html
                      color_errorpage.html
                      text_errorpage.html
                      name_errorpage.html
                      email_errorpage.html
                      background_errorpage.html
                      ((and the comments box))
                      confirmation1.html

                      below is what I have now, that you have given me before (without the category)

                      <?php
                      // Receiving variables from the form
                      @$image = addslashes($_POST['image']);
                      @$text_color = addslashes($_POST['text_color']);
                      @$text_font = addslashes($_POST['text_font']);
                      @$name_to_add_with_image = addslashes($_POST['name_to_add_with_image']);
                      @$email = addslashes($_POST['email']);
                      @$comments = addslashes($_POST['comments']);
                      @$background = addslashes($_POST['background']);
                      // Validation for empty fields and email
                      if (strlen($image) == 0 )
                      {
                      header("Location: image_errorpage.html");
                      exit;
                      }
                      if (strlen($text_color) == 0 )
                      {
                      header("Location: color_errorpage.html");
                      exit;
                      }
                      if (strlen($text_font) == 0 )
                      {
                      header("Location: text_errorpage.html");
                      exit;
                      }
                      if (strlen($name_to_add_with_image) == 0 )
                      {
                      header("Location: name_errorpage.html");
                      exit;
                      }
                      if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $email))
                      {
                      header("Location: email_errorpage.html");
                      exit;
                      }
                      if (strlen($email) == 0 )
                      {
                      header("Location: email_errorpage.html");
                      exit;
                      }
                      if (strlen($background) == 0 )
                      {
                      header("Location: background_errorpage.html");
                      exit;
                      }
                      //Sending Email to form owner
                      $pfw_header = "From: $email\n"
                      . "Reply-To: $email\n";
                      $pfw_subject = "Animated Sparkle Name Order";
                      $pfw_email_to = "Graphics?fromtheheartofangels.com"; replacing ? with @
                      $pfw_message = "image: $image\n"
                      . "text_color: $text_color\n"
                      . "text_font: $text_font\n"
                      . "name_to_add_with_image: $name_to_add_with_image\n"
                      . "email: $email\n"
                      . "comments: $comments\n"
                      . "background: $background\n";
                      *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
                      header("Location: confirmation1.html");
                      ?>


                      Thanks navaldesign........no hurry....I know you have a life out of here........

                      http://www.fromtheheartofangels.com/

                      Comment

                      • navaldesign
                        General & Forum Moderator

                        • Oct 2005
                        • 12080

                        #56
                        Re: Need help with form

                        category_errorpage.html
                        image_errorpage.html
                        color_errorpage.html
                        text_errorpage.html
                        name_errorpage.html
                        email_errorpage.html
                        background_errorpage.html
                        ((and the comments box))
                        confirmation1.html

                        below is what I have now, that you have given me before (without the category)

                        <?php
                        // Receiving variables from the form
                        @$category = addslashes($_POST['category']);
                        @$image = addslashes($_POST['image']);
                        @$text_color = addslashes($_POST['text_color']);
                        @$text_font = addslashes($_POST['text_font']);
                        @$name_to_add_with_image = addslashes($_POST['name_to_add_with_image']);
                        @$email = addslashes($_POST['email']);
                        @$comments = addslashes($_POST['comments']);
                        @$background = addslashes($_POST['background']);
                        // Validation for empty fields and email
                        if (strlen($category) == 0 )
                        {
                        header("Location: category_errorpage.html");
                        exit;
                        }

                        if (strlen($image) == 0 )
                        {
                        header("Location: image_errorpage.html");
                        exit;
                        }
                        if (strlen($text_color) == 0 )
                        {
                        header("Location: color_errorpage.html");
                        exit;
                        }
                        if (strlen($text_font) == 0 )
                        {
                        header("Location: text_errorpage.html");
                        exit;
                        }
                        if (strlen($name_to_add_with_image) == 0 )
                        {
                        header("Location: name_errorpage.html");
                        exit;
                        }
                        if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $email))
                        {
                        header("Location: email_errorpage.html");
                        exit;
                        }
                        if (strlen($email) == 0 )
                        {
                        header("Location: email_errorpage.html");
                        exit;
                        }
                        if (strlen($background) == 0 )
                        {
                        header("Location: background_errorpage.html");
                        exit;
                        }
                        //Sending Email to form owner
                        $pfw_header = "From: $email\n"
                        . "Reply-To: $email\n";
                        $pfw_subject = "Animated Sparkle Name Order";
                        $pfw_email_to = "Graphics?fromtheheartofangels.com"; replacing ? with @
                        $pfw_message = "Category : $category\n"
                        . "image: $image\n"
                        . "text_color: $text_color\n"
                        . "text_font: $text_font\n"
                        . "name_to_add_with_image: $name_to_add_with_image\n"
                        . "email: $email\n"
                        . "comments: $comments\n"
                        . "background: $background\n";
                        *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
                        header("Location: confirmation1.html");
                        ?>



                        What do you mean "And the comments box " ?

                        For the rest, just add these lines in red, copy the script, paste it in Notepad, change the ? in @, go to "Save as", choose file type "All files", and save it with the same name you had, with the extension .php Upload the php file on your site. Attention: in same cases, if you already have a .php with the same name, it will be saved as ..... (1).php So it would be wise to save the file in another folder. Once that the script has been tested and it works, delete the old script from your computer
                        Navaldesign
                        Logger Lite: Low Cost, Customizable, multifeatured Login script
                        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                        Comment

                        • Bird
                          Captain

                          • Oct 2005
                          • 202

                          #57
                          Re: Need help with form

                          Thanks navaldesign.........
                          I now have it done, and uploaded, everything is working perfectly.
                          I also received the email after submission.
                          Looks good at my end, and now if I could get someone here to test it for me, I will know it works.
                          almost ready for the paypal button...I know how to do that, but if I get stumped, I will be back asking...
                          Thanks again for all your help.
                          Bird


                          http://www.fromtheheartofangels.com/

                          Comment

                          • Bird
                            Captain

                            • Oct 2005
                            • 202

                            #58
                            Re: Need help with form

                            Adding the link here to show how my form looks.
                            Not finished yet, as I have to put on the glitter tiles, and the paypal button. So if anyone wants to see the error page, just click on the submit button, no need to fill it out.
                            It works perfectly.

                            Thanks for all the help, Navaldesign.


                            http://www.fromtheheartofangels.com/

                            Comment

                            • sandysewin
                              Master Sergeant

                              • Feb 2006
                              • 67

                              #59
                              Re: Need help with form

                              Hey, very nice site! Your order form was easy to manage, and your error messages were well designed.

                              One thing I noticed while going through some of the images: when you get to the last page in a series of images, it's confusing to have a "next" button which doesn't work (on the top right.)

                              Now I'm off to design my own form, complete with error messages . . .

                              Sandy
                              www.creationspraise.com
                              www.secretsoforganizedpeople.com
                              www.huntresscustom.com

                              The one who dies with the most toys wins . . . . . . . . nothing! (Matthew 16:26)

                              Comment

                              • sandysewin
                                Master Sergeant

                                • Feb 2006
                                • 67

                                #60
                                Re: Need help with form

                                Is it possible to have portions of forms greyed out, which would become non-greyed out (active?) once a box is checked? And also I may want to do the reverse, a particular choice may cause sections to be greyed outl.

                                How would I do this? Do I have to insert scripts, or is it possible with BV as is?

                                Thanks,

                                Sandy

                                P.S. Should I start a new thread with this question?
                                www.creationspraise.com
                                www.secretsoforganizedpeople.com
                                www.huntresscustom.com

                                The one who dies with the most toys wins . . . . . . . . nothing! (Matthew 16:26)

                                Comment

                                Working...
                                X