10 Replies Latest reply on Aug 20, 2016 2:14 AM by SanchezMusics

    Having trouble validating a form- Please help


      Hi I'm not too sure where I went wrong here, but if someone can please look at this code, it will be much appreciated. The form is sending the data out correctly, but it's not validating. I've tried using html5, and jquery to validate these input fields... and technically, it should work- but it's not...where did I go wrong? I've been trying to figure this out for a few days now...



      Ok, so, here's the link to my files:




      ..I created a symbol called form, and attached these actions to it:





      $("<input type='email' id='Email' class='required' name='Email' tabindex='2' maxlength='200' style='background-color:white; border:1px solid black' required>").appendTo(sym.$("emailbox"));

      $("<input type='text' id='Firstname' class='required' name='first_name' pattern=' .{5,30}'  tabindex='1' maxlength='200' style='background-color:white; border:1px solid black' required>").appendTo(sym.$("firstnamebox"));

      $("<input id='myform' >").appendTo(sym.$("form"));








      ...and my send button has these actions attached to it:





      var emailFromVal = Email.value;



      var messageVal = "<strong><p><font face='helvetica' size='5'> Name : "+Firstname.value+"<br><br> Email: "+Email.value+"</p>";



      // we add this variable to make sure if anyone find out the address of our php file cant send empty message by calling php file by url

      var Permission = 1;

      alert("Thank you, we will contact you shortly");

      $.post("sendEmail.php",{ flag:Permission, email:emailFromVal, message:messageVal });








      Permission = 0;

        • 1. Re: Having trouble validating a form- Please help
          hemanthR Adobe Employee

          HTML5 validation will run when you put all your email,url and other tags in a form element and click on submit button.

          Something like this :

          $('<form  id="commentForm" method="get" action="">').appendTo(sym.$("form"));

          $('<input  name="name" minlength="2" type="text" required>').appendTo($('#commentForm'));

          $('<input  type="email" name="email" required>').appendTo($('#commentForm'));

          $('<input class="submit" type="submit" value="Submit">').appendTo($('#commentForm'));

          1 person found this helpful
          • 2. Re: Having trouble validating a form- Please help
            Melissa_Sunshine29 Level 1

            Thankyou so much for responding back...HTML 5 would of been the ideal situation to use..because it is the easiest method to implement..Unfortunately, it's tricky to use within forms built in edge animate.. I tried your suggestion above..but it didn't work   for me.. After  trying different variations I ended up using Javascript within the submit button

            • 3. Re: Having trouble validating a form- Please help
              Zaxist Level 4

              Hi Dear Melissa

              Sorry for delay, i had a dead line on a project and i didnt had time to respond to your answer sooner...


              i can see you are doing everything just great except the validation part !!


              i can see you are using this command :




              after you made your form, but i cant see any function with name validate that handel the job, also ifwe think that you have this function you should put it on your Submit button > Click action not at the end of form creation


              so here is my question :


              what is that thing exactly that you want to check ?


              A - Email address ?

              B - Phone Number ?

              C - or just a simple check that all fileds are empty or not ?


              i'm waiting for your reply



              1 person found this helpful
              • 4. Re: Having trouble validating a form- Please help
                Melissa_Sunshine29 Level 1

                Hi Zaxist, thankyou for your response...I was looking to check the email address, and the name field...

                • 5. Re: Having trouble validating a form- Please help
                  Melissa_Sunshine29 Level 1

                  ..Honestly, I didn`t think that I had to write a function to handel the job.. I was hoping that Jquery would of taken care of it...  Obviously the approach that I used was wrong ...If I could use HTML 5 in the future I  would prefer to use that because of its simplicity.... 


                  This was the reference that I used.


                  ..Do you know where I went wrong? Perhaps I should of used this as a function because it wasn`t in form brackets:????

                  var inputs = $("#mydiv :input").validator();


                  ...I actually ended up using a Javascript example that you had which worked perfectly! So Thankyou!.... I just don`t know where I went wrong with my original approach

                  1 person found this helpful
                  • 6. Re: Having trouble validating a form- Please help
                    Zaxist Level 4

                    Well Dear Melissa


                    what i want to write now is for all Adobe Edge Animate Users like you


                    First of all : The Idea for Adobe Edge Animate at first was a simple program for users to make just a banner but not a regular one, to create a special One


                    So All Adobe Edge Animate Team didint make this program for you to making a Complete website with a form with validation or other special features that you can see on the other sites like parallax effects or anything else but a Simple/interactive great banner


                    well, so if you want to do other things you should have knowledge about jQuery Program Language !

                    this means if you dont have it you cant have a complete website with all special features !!


                    Second : Actually this link http://jquerytools.org/documentation/validator/ you wrote it in your message needs jQuery knowledge and this pluging has made with jQuery language


                    so if you dont have that knowlegde you cant use it, no matter where you  trying to use it, like simpel HTML5 Code or ASP or PHP or any other form of web designing like a wordpress and ....


                    so i said all of this to get here : Please Please Please dont give up if you dont have enough knowledge about what you are trying to do and be patient if you ask a question in this forum


                    why ? because you will get a right answer and you will drag into the right direction



                    well lets get back to your question:


                    i dont know if you know this or not but : nobody can check a email is valid or not with just some lines jQuery codes..

                    we can just check a format of that email address is valid or not

                    so that plugin also cant tell you if this email is real or its fake, it just can say that this text is a valid format for email address or not !!


                    i dont know why nobody cant make a form with validation with all of explanation that i wrote in this thread : http://forums.adobe.com/message/5392391#5392391


                    so i decided to make one for all of you


                    in this form i made we have :


                    • checking all fileds that are not empty


                    • 2 type of Email verification
                    1. Real Email Verification (On Sumbit1 Button)
                    2. Just Simple Email Format Validation (On Submit2 Button)


                    • Checking numbers like Telephone ( you need regex knowledge to modify it)


                    • a box for writing message


                    • 2 type of designing Button in Edge Animate
                    1. One with using CSS
                    2. One with Edge Animate itself


                    • Reset Button to clean all fileds


                    • Message for User that Form is not Fill or Email is not correct or Phone is not correct or the Message has been sent



                    i hope these things can solve all users issue about making a form in Edge Animate


                    Note : this cant send email in local mode, you should have all of files and php file on a real web server not a local server


                    Note : you have to put your email address in php file so it can send all information in to that email address


                    Note : you have to get a New APIkey for that Real Email Address Checking for the site that is inside submit1 button > Click Action


                    Note : Now it's already have a new APIkey for testing 100 email address but please use it once so others can have chance to test it


                    Note : to check email address with Submit1 button you should have internet connection


                    Note : to check email address with Submit2 button you dont need anything, its completely free and it just checks the Format not fake or real


                    so you can check the difference with using foo@bar.com address as sample


                    Note : Please read all Codes Carefully with more precision to learn




                    Link to Sample File : http://www.mediafire.com/download/stznaxnmf0bbsyy/Form.rar






                    • 7. Re: Having trouble validating a form- Please help
                      Melissa_Sunshine29 Level 1

                      Hi Zaxist,


                      Thank you so much for taking the time to answer my question and for providing a link to the correct form codes. Honestly, your threads on how to create a proper from in Adobe Edge have been the most helpful to me, and I know that it will help many others as well.

                      • 8. Re: Having trouble validating a form- Please help

                        thank very mutch again Zaxist, its all i need and trying find like 2 months!!! i think ur post should be a topic for ppl looking for contact forms maded in edge animate!

                        many thanks again!!

                        • 9. Re: Having trouble validating a form- Please help
                          Zaxist Level 4

                          you're welcome

                          i'm happy that i could help you




                          • 10. Re: Having trouble validating a form- Please help
                            SanchezMusics Level 1

                            Zaxist Hello, I'm trying to adapt your form in the new animated edge 2015, but does not work. This is necessary otherwise I can not change the names in my language in Italian and I can not even make the procedure saves -> public because the Web folder does not create it.


                            I tried your form without making changes and it works great.

                            If I make changes, for example: Full name to name, I see the changes in animated edge and preview browser, but if you save and open the file from.html is always full name.


                            Please can you help me to make it compatible with the new edge animated 2015 edge.6.0.0.min.js and js folder? Thanks so much