Simple Form Animation With Javascript Tutorial | HTML Forms | Learn Javascript

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2019
  • Check out my courses and become more creative!
    developedbyed.com
    Simple Form Animation With Javascript Tutorial | HTML Forms | Learn Javascript
    ❤Become a patreon for exclusive videos and more!
    / dev_ed
    Microphones I Use
    Audio-Technica AT2020 - geni.us/Re78 (Amazon)
    Deity V-Mic D3 Pro - geni.us/y0HjQbz (Amazon)
    BEHRINGER Audio Interface - geni.us/AcbCpd9 (Amazon)
    Camera Gear
    Fujifilm X-T3 - geni.us/7IM1 (Amazon)
    Fujinon XF18-55mmF2.8-4 - geni.us/sztaN (Amazon)
    PC Specs
    Kingston SQ500S37/480G 480GB - geni.us/s7HWm (Amazon)
    Gigabyte GeForce RTX 2070 - geni.us/uRw71gN (Amazon)
    AMD Ryzen 7 2700X - geni.us/NaBSC (Amazon)
    Corsair Vengeance LPX 16GB - geni.us/JDqK1KK (Amazon)
    ASRock B450M PRO4 - geni.us/YAtI (Amazon)
    DeepCool ATX Mid Tower - geni.us/U8xJY (Amazon)
    Dell Ultrasharp U2718Q 27-Inch 4K - geni.us/kXHE (Amazon)
    Dell Ultra Sharp LED-Lit Monitor 25 2k - geni.us/bilekX (Amazon)
    Logitech G305 - geni.us/PIjyn (Amazon)
    Logitech MX Keys Advanced - geni.us/YBsCVX0 (Amazon)
    DISCLAIMERS:
    I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
    Today we are going to use Javascript to add some animations to our html forms. You can use this to create simple html login forms or registration forms. Including animation for form validation using html and javascript.
    We are also going to learn how to structure all your inputs and icons inside each form group. Taking the data from a form and submitting it will come in a later tutorial.
    This video is made for people who want to learn more about HTML Forms and Javascript in very easy steps.
    📔 Materials used in this video:
    Font Awesome: fontawesome.com/
    🛴 Follow me on:
    Twitter: / deved94
    Github: github.com/DevEdwin
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 247

  • @developedbyed
    @developedbyed  5 ปีที่แล้ว +46

    Hope you like this one! Sorry if its a bit too long. I tried to jam as much as possible in 35 minutes!

    • @sidisidahmed9081
      @sidisidahmed9081 5 ปีที่แล้ว

      I like animation using js ; because I learn JavaScript like this project

    • @nepalcodetv6298
      @nepalcodetv6298 5 ปีที่แล้ว +1

      you could have cut it down to 20 min by not doing from scratch just showing javascript part & little summary of HTML & CSS

    • @ibrahims.h.4403
      @ibrahims.h.4403 5 ปีที่แล้ว

      can you see what Im doing wrong? I cannot run it? I watched the video 3 times run through all again and again but failed...
      // JavaScript Document
      function animatedForm() {
      const arrows = document.querySelectorAll('.fa-arrow-down');
      arrows.forEach(arrow => {
      arrow.addEventListener('click', () => {
      const input = arrow.previousElementSibling;
      const parent = arrow.parentElement;
      const nextForm = parent.nextElementSibling;
      if(input.type === "text" && validateUser(input)){
      nextSLide(parent,nextForm);
      }
      else if(input.type == "email" && validateEmail(input)) {
      nextSLide(parent, nextForm);
      }
      else if(input.type === "number" && validateUser(input)) {
      nextSLide(parent, nextForm);
      }
      else{
      parent.style. animation = "shake 0.5s ease";
      }
      parent.addEventListener("animationend", () => {
      parent.style.animation = "";
      })
      })
      })
      }
      function validateUser(user){
      if(user.value.length < 6){
      consolo.log("not enough characters");
      error("rgb(189, 87, 87)");
      }else{
      error("rgb(87, 189, 130)");
      return true;
      }
      }
      function validateEmail(email) {
      const validation = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
      if(validation.test(email.value)){
      error('rgb(87,189,130)');
      return true;
      }
      else {
      error('rgb(189,87,87)');
      }
      }
      function validateNumber(number) {
      const validation = /^(\([0-9]{3}\) |[0-9]{3}-)[0-9]{3}-[0-9]{4}/;
      if(validation.test(number.value)){
      error('rgb(87,189,130)');
      return true;
      }
      else {
      error('rgb(189,87,87)');
      }
      }
      function nextSLide(parent, nextForm){
      parent.classList.add("inactive");
      parent.classList.remove("active");
      nextForm.classList.add("active");
      }
      function error(color) {
      document.body.style.backgroundColor = color;
      }
      animatedForm();

    • @rpanda_old
      @rpanda_old 5 ปีที่แล้ว

      not long at all. Its a useful video and not at all boring. Keep making more videos like this dont worry about the length.

    • @C_Ariss
      @C_Ariss 4 ปีที่แล้ว

      I thought the length was great, as someone just starting out with a very brief knowledge of HTML CSS JS i found the explanations really useful. Thank you.

  • @bentaylor10
    @bentaylor10 5 ปีที่แล้ว +7

    Loving the tutorials dude! i'm going to be applying for my first frontend job in the next few weeks and your channel has been an amazing help :)

  • @diegorobayo9013
    @diegorobayo9013 4 ปีที่แล้ว +3

    I have only watched one minute of this video and I am already certain that I will enjoy so much and I will watch it until the end. Thanks Ed!!

  • @faizanhassan2088
    @faizanhassan2088 5 ปีที่แล้ว +14

    your voice is too amazing specially when you say "oh my goodness" (once in your tutorial)

  • @rebeccayoung8266
    @rebeccayoung8266 5 ปีที่แล้ว +1

    Thank you for another great tutorial, finally, JS is starting to make sense! I like your videos as they are bite-sized and they don't take up 3-4 hours like some tutorials. Another idea of progressing this further would be to change the placeholder to a label above on click for accessibility :)

  • @amarnathmukherjee3900
    @amarnathmukherjee3900 5 ปีที่แล้ว +3

    I am just love this video . Your are just awesome. Specially I like your video because you explain everything so clearly so I don't have to copy I can just remember and do my own. It's really help me to learn.

  • @nzekwemichael1862
    @nzekwemichael1862 2 ปีที่แล้ว +1

    I'm so happy that I came across your tutorial,you are such a good tutor,make more videos please,I'm a begginer and I'm learning alot since I found you

  • @andychung6877
    @andychung6877 5 ปีที่แล้ว +2

    Amazing, keep working hard man!

  • @jeremiah869
    @jeremiah869 5 ปีที่แล้ว +4

    Love your content man - keep up the awesome work :)

  • @neosabiit
    @neosabiit 5 ปีที่แล้ว +6

    Fall in love with your code...Love from Bangladesh Sir.

  • @sanji0302177
    @sanji0302177 4 ปีที่แล้ว +2

    I'm from Taiwan.
    Love your JS tutorial so much!

  • @krispip1666
    @krispip1666 5 ปีที่แล้ว

    I really love your videos! Amazing work !

  • @4Y0P
    @4Y0P 5 ปีที่แล้ว +8

    You have a really nice voice, made the video as easy listen 😄

  • @obeid_s
    @obeid_s 5 ปีที่แล้ว +2

    nice one man .. everything is clear .. hope u hit the 100k soon , good luck.

  • @idkrn5301
    @idkrn5301 5 ปีที่แล้ว

    Really nice tutorial, clear and informative, learned a couple new things from it

  • @yaroslavkozak
    @yaroslavkozak 5 ปีที่แล้ว

    yo, man. Loved your tutorial. Spend last 20 minutes looking for it, as almost all others are so boring and tasteless. I have remembered that I watched you couple of months ago and tried so many things to find this vid. Thanks for such an addictive content!

    • @developedbyed
      @developedbyed  5 ปีที่แล้ว

      Thanks so much! Glad I helped!

  • @faizanhassan2088
    @faizanhassan2088 5 ปีที่แล้ว +1

    yes do it man we need that. and one more thing plz make a tutorial on any database, how to store in database that taken input from user?

  • @reudostf
    @reudostf 5 ปีที่แล้ว +3

    Omg, so nice!! From Brazil

  • @lakshmangope8963
    @lakshmangope8963 5 ปีที่แล้ว +1

    it's amazing! keep up the good work.

  • @matfen7978
    @matfen7978 5 ปีที่แล้ว +3

    Again, an awesome video, learnt and had fun
    ["Milk", "Cow"]

  • @alijonkuvondikov2861
    @alijonkuvondikov2861 3 ปีที่แล้ว

    Thank you very much. In this course, I learned the animation button

  • @l3_p14f9
    @l3_p14f9 2 ปีที่แล้ว

    Didn't watch your videos for like three or four months. Forgot how fun and educational they are!

  • @wwt17
    @wwt17 5 ปีที่แล้ว +1

    Nice. Would be really cool if you did a follow up vid to do the things you talk about at the end!

  • @ahadsvlog1366
    @ahadsvlog1366 3 ปีที่แล้ว

    Learning is great with your amazing style. Love it.

  • @JahangirKhan-dc3mm
    @JahangirKhan-dc3mm 5 ปีที่แล้ว +4

    please upload more javascript project videos(small project).. awesome content....Subscribed

  • @remax110
    @remax110 5 ปีที่แล้ว

    Awesome tutorial. Thank you.

  • @TherealEmemay
    @TherealEmemay 3 ปีที่แล้ว

    Really good man thank you

  • @joshuatao7020
    @joshuatao7020 5 ปีที่แล้ว

    Great video.👍👍👍Thank you,sir !

  • @mauriciomiranda3218
    @mauriciomiranda3218 4 ปีที่แล้ว

    Sensacional, seus tuturiais são muito bons!

  • @user-cn9wp7gk9t
    @user-cn9wp7gk9t 3 ปีที่แล้ว

    its really cool 😍
    Thank you for this 👏

  • @proknlee
    @proknlee 4 ปีที่แล้ว +1

    awesome video Ed!!!1

  • @bikramchettri9405
    @bikramchettri9405 5 ปีที่แล้ว

    Thank you. I have two video request, put those tutorials whenever you want. 1.Responsive Tabs and Accordions using javascript

  • @rithvikbhat6860
    @rithvikbhat6860 4 ปีที่แล้ว

    Amazing video it's helped me a lot!

  • @adilskillz2694
    @adilskillz2694 3 ปีที่แล้ว

    love it man.. Keep going. We are behind you :)

  • @johnbritto4960
    @johnbritto4960 5 ปีที่แล้ว

    Awesome man... superb... Best wishes

  • @alibarznji2000
    @alibarznji2000 4 ปีที่แล้ว +1

    you used two arrow icons for the email field,Love you btw

  • @husseineid7885
    @husseineid7885 3 ปีที่แล้ว

    Your content is great. Kindly keep up.

  • @diegovillamil7999
    @diegovillamil7999 3 ปีที่แล้ว

    I just watched this video and is amazing bro, thank you so much for this and if you ended up making the full JavaScript tutorial I would appreciate it if you share the link with me, I'd like to watch it too, thanks

  • @hassanalnajjar8881
    @hassanalnajjar8881 2 ปีที่แล้ว

    amz bro thx for this dude

  • @yigit2505
    @yigit2505 3 ปีที่แล้ว

    thanks a lot for this great work.

  • @rafaelcavallin3952
    @rafaelcavallin3952 5 ปีที่แล้ว +1

    Thank you Bro! :)

  • @user-mh1lt6hv8i
    @user-mh1lt6hv8i 5 ปีที่แล้ว

    Круто! Спасибо из Новосибирска!)

  • @niharikab5202
    @niharikab5202 3 ปีที่แล้ว

    I liked it...in a small time had learned a lot

  • @sidyniang_coding4101
    @sidyniang_coding4101 ปีที่แล้ว

    HiDev Ed, this is a really cool video, i enjoy it ! 😁

  • @arthurradium5823
    @arthurradium5823 5 ปีที่แล้ว

    i love your videos..and u are very sympathic !

  • @wornozkhmone6411
    @wornozkhmone6411 3 ปีที่แล้ว

    i am from Bangladesh.this tutorial is very good and helpful for a starter label .i love this tutorial.

  • @LongEnough1987
    @LongEnough1987 4 ปีที่แล้ว

    Thank you! 🙏

  • @viktorkasap
    @viktorkasap 4 ปีที่แล้ว +1

    Очень классный пример) спасибо, хорошее решение для логина =)

  • @nurharizulaimanmatharith4023
    @nurharizulaimanmatharith4023 4 ปีที่แล้ว

    Your videos really give me inspiration..thank you Ed

    • @danilmaheshwari5696
      @danilmaheshwari5696 3 ปีที่แล้ว

      Can you share me the HTML and JavaScript File. I am stuck at the validations parts of the functions. Cant really get through it.
      danilgamingacc@gmail.com

  • @marsin23
    @marsin23 5 ปีที่แล้ว +12

    >simple
    >35 minutes
    javascript is at it again

  • @phantomboy1496
    @phantomboy1496 5 ปีที่แล้ว

    Awesome Animation

  • @mythm2063
    @mythm2063 3 ปีที่แล้ว

    thanks a lot bro

  • @shivamgoyal796
    @shivamgoyal796 5 ปีที่แล้ว

    You are awesome man 😎

  • @1vigneshram
    @1vigneshram 3 ปีที่แล้ว

    Learnt today well flow of javascript and dom

  • @hasany1562
    @hasany1562 3 ปีที่แล้ว +2

    How can I print the (Not Enough Charachter) in a h2 and on the box?

    • @adetolasanni007
      @adetolasanni007 2 ปีที่แล้ว

      Hey Hasan you can check out what I did with the project here - github.com/kruze-dev/Form_validation

  • @leonardoscuro
    @leonardoscuro 4 ปีที่แล้ว +2

    what extension do you have to close tags without closing on save like this

  • @davronbekteacher
    @davronbekteacher 5 ปีที่แล้ว

    Thank you bro!!!

  • @mitchelldejonghe4271
    @mitchelldejonghe4271 5 ปีที่แล้ว

    Great tutorial!

  • @jackmanjls
    @jackmanjls 5 ปีที่แล้ว

    Nice organized presentation with free icons...excellent

    • @developedbyed
      @developedbyed  5 ปีที่แล้ว

      Thanks alot! Trying my best.

  • @shamanicmonotheism
    @shamanicmonotheism 3 ปีที่แล้ว

    Thank you. It was best to learn to make project with java script among all of videos on java script.

  • @HostDotPromo
    @HostDotPromo 5 ปีที่แล้ว +57

    Man I am addicted to Javascript!

    • @melvinkimathi8924
      @melvinkimathi8924 4 ปีที่แล้ว +1

      JavaScript was my first-love

    • @strxangxl
      @strxangxl 4 ปีที่แล้ว

      @@melvinkimathi8924 Same here

    • @whoami5583
      @whoami5583 3 ปีที่แล้ว

      We are same bro

    • @marcus.the.younger
      @marcus.the.younger 3 ปีที่แล้ว

      i am learning js now...
      but i am addicted to python and tkinter

    • @danilmaheshwari5696
      @danilmaheshwari5696 3 ปีที่แล้ว

      Can you share me the HTML and JavaScript File. I am stuck at the validations parts of the functions. Cant really get through it.
      danilgamingacc@gmail.com

  • @alizahmohammadsamaneen6347
    @alizahmohammadsamaneen6347 5 ปีที่แล้ว

    this is your another best video

  • @umersaeed259
    @umersaeed259 5 ปีที่แล้ว

    Hey Bro, You are a good teacher. Please make a video of a complete website.

  • @shankargurung1335
    @shankargurung1335 หลายเดือนก่อน

    Lovely 🤘🤘

  • @omosironaiomosironai
    @omosironaiomosironai 5 ปีที่แล้ว

    brilliant!

  • @naiki1409
    @naiki1409 5 ปีที่แล้ว

    what's your vs code theme extension? thanks

  • @javascriptwar9525
    @javascriptwar9525 5 ปีที่แล้ว

    Thankyou very much

  • @milehighstadium06
    @milehighstadium06 4 ปีที่แล้ว

    Could someone please help me, in my app.js im getting document is not defined on the part where when try to get the arrow to log the input to the console. Thanks!

  • @kuvonchbek871
    @kuvonchbek871 3 ปีที่แล้ว

    very understandable

  • @ArthurJ7154
    @ArthurJ7154 2 ปีที่แล้ว

    What program are you using to write down your code?

  • @TherealEmemay
    @TherealEmemay 3 ปีที่แล้ว

    Thank you

  • @ioannisme7495
    @ioannisme7495 5 ปีที่แล้ว

    wow I've learned the basics of JavaScript in one week but to start to thinking so complex like this it's just unreal... !!!!!!!!

    • @eoussama
      @eoussama 5 ปีที่แล้ว

      Wut?

  • @alejandrogonzalez1984
    @alejandrogonzalez1984 5 ปีที่แล้ว +1

    Keep it up!

  • @kansizorhan2483
    @kansizorhan2483 5 ปีที่แล้ว

    you are hero

  • @deepalirajenimbalkar6318
    @deepalirajenimbalkar6318 4 ปีที่แล้ว

    Which editor do you use

  • @synoplex8042
    @synoplex8042 3 ปีที่แล้ว +1

    Bro you are too funny I like your style of teaching:)

  • @mohammadanarul624
    @mohammadanarul624 5 ปีที่แล้ว

    Thanks a lot....

  • @rphuntarchive1
    @rphuntarchive1 5 ปีที่แล้ว +28

    Description is missing the regex.

    • @Ameiren
      @Ameiren 3 ปีที่แล้ว +8

      The regex: /^[^\s@]+@[^\s@]+\.[^\s@]+$/;

  • @philippenangui1573
    @philippenangui1573 5 ปีที่แล้ว

    i like that !

  • @wheres_bears1378
    @wheres_bears1378 4 ปีที่แล้ว

    can someone please refresh me on the specificity of .field-name i vs div.inactive ?

  • @akhwan5297
    @akhwan5297 4 ปีที่แล้ว

    hi, mr. dimitri marco, why validate email not execute red color althought i didn't input email sign @ ?? i try to follow by video to write that crazy sign like this /^[^\s@]+@[^\s@]+\.[^\s@]+$/ but it still execute the green one.

  • @dnoizaudio
    @dnoizaudio 4 ปีที่แล้ว +1

    Hi friend, how can we do to change this body tag ??? and change the style of another block for example ??? I want to know how we can use this script in the other medium than the body. for example I create a class and I apply this script to this class. but also I would like to know if we get to the end of these tests is what form must submit without submit button ????

  • @farazmehraien3913
    @farazmehraien3913 4 ปีที่แล้ว +1

    fantastic, good vibes from you again, but forget regex that everyone can google it, np

  • @user-nb6jv1bz5p
    @user-nb6jv1bz5p 5 ปีที่แล้ว

    Спасибо! Очень полезно 👍

  • @shna90
    @shna90 7 หลายเดือนก่อน

    what the music are you using in the beginning? i like it !

  • @TheHairbowMaster
    @TheHairbowMaster 3 ปีที่แล้ว

    Is there any way you can put this code in github or codepen so we can use it to help us build our own spin on it? Thanks!

  • @subtituladoschile1024
    @subtituladoschile1024 4 ปีที่แล้ว +3

    Your video and energy are on point brother! You have a new subscriber here. Excellent work but Font Awesome has changed, do you know by any chance how to get that link you shared in 1:55? I'll copy it character by character but I think answering this might help others too. Awesome tutorial! Thanks

    • @supernoblica
      @supernoblica 4 ปีที่แล้ว

      I have the same question. I have manually typed it but still does not work.

  • @1vigneshram
    @1vigneshram 3 ปีที่แล้ว

    This video is great thanks DevEd for creating such a nice video today i have learnt css more here like position:realtive when to use it and position absolute ........ and also flexbox And javscript is little confusing if i watch 3 to 4 times i will get it

    • @danilmaheshwari5696
      @danilmaheshwari5696 3 ปีที่แล้ว

      Can you share me the HTML and JavaScript File. I am stuck at the validations parts of the functions. Cant really get through it.
      danilgamingacc@gmail.com

  • @mehdiferhat2773
    @mehdiferhat2773 4 ปีที่แล้ว

    thanks

  • @samrajaved1163
    @samrajaved1163 3 ปีที่แล้ว

    sir,IDK but my inactive and active is not working in the project?? now, what should I do..

  • @yalinkhere8212
    @yalinkhere8212 5 ปีที่แล้ว +1

    Can I see you creating registration form with email verification sir? thank you.

  • @rajeshrout648
    @rajeshrout648 5 ปีที่แล้ว +1

    Can we use this in a section ? U have used it in a complete body but I want to use it in section . When somebody will scroll down then they should be able to use it. I tried but it’s not happening. The problem is : when u checked the condition for the input value , is its false then you changed the colour by using - document.body.style.background - colour; . Here As I have two section in the body so I was passing the class name and that is - middle . So my code was document.middle.style.background - color. But it’s showing problems. I tried to get the element of the class as well but nothing happening. Please help me

  • @lukemasi2759
    @lukemasi2759 5 ปีที่แล้ว

    Ya like it but I have requested on last video commented to build video web site design that load video's in same page and it also play it please teach,e that

  • @swadha0007
    @swadha0007 3 ปีที่แล้ว

    how will innactive work which extension to be downloaded for this .. anyone help ?

  • @vaibhavgehani9315
    @vaibhavgehani9315 5 ปีที่แล้ว +1

    why am getting nodelist[0] after selecting the class of arrows using queryselectorAll(.fa-arrow-down)?

    • @Krilllind
      @Krilllind 5 ปีที่แล้ว

      Does "nodelist[0]" imply that your result nodelist has zero elements in it, or are you trying to access an item at position 0?

    • @vaibhavgehani9315
      @vaibhavgehani9315 5 ปีที่แล้ว

      @@Krilllindit implies that 0 element is selected

    • @ricardoramirez1884
      @ricardoramirez1884 5 ปีที่แล้ว

      @@vaibhavgehani9315 I've gone back to the video a few times to make sure I have things the way he has them set up but I'm having the same issue here.

  • @adetolasanni007
    @adetolasanni007 2 ปีที่แล้ว

    Hey Ed, why will the Enter key not submit the form?

  • @VRReal-Estate
    @VRReal-Estate 5 ปีที่แล้ว

    Sir super do all concpets

  • @krimo10
    @krimo10 5 ปีที่แล้ว

    i get an unexpected token > error at the foreach in js. Somebody help!

  • @user-hy8pl5en4j
    @user-hy8pl5en4j 4 ปีที่แล้ว

    1:51 it doesnot appear any code link it wants a kit ? And What'S A Kit :(

  • @andreasfurst9406
    @andreasfurst9406 5 ปีที่แล้ว

    i get an error: const arrows = document.querySelectorAll(".fa-arrow-down");
    ^
    ReferenceError: document is not defined
    do you have a idea?

    • @tontonsan3534
      @tontonsan3534 5 ปีที่แล้ว

      Try adding in your HTML the script element at the end of the document just above and ensure you linked it properly, see if that works?