Grow your CSS skills. Land your dream job.

Append new textfield via JS

  • # January 16, 2013 at 6:12 am

    Hey guys!

    I’m kind of stuck in a JS-Problem.

    **The goal**

    I’m trying to achieve a behavior like it’s found in the reminders web-app (iCloud) by Apple. What it does is, that if you fill a textfield (at least one character), it will automatically append a new one below. So you can add tasks “on the fly”.

    I tried to do it exactly that way, but it turned out my JS knowledge is too shitty :)

    I hope someone could help me out here. I made a pen with the basic layout.

    Check out this Pen!

    Thanks!

    # January 16, 2013 at 7:48 am

    This should get you started.

    http://codepen.io/andyunleashed/pen/FJwCh

    I’ve basically set it so on keyup in the input it adds another text field. Still needs a lot of work though.

    # January 16, 2013 at 8:44 am

    Hey!

    Thanks for your help!

    Is there any possibility to “refresh” the JS? I tried to achieve the behavior, that if the second textfield is filled a third one should appear, and if the third one is filled a fourth one appears, and so on.
    Do you have any idea how to achieve this?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".