Jump to content

Form Jumping


jamesjmann

Recommended Posts

I doubt "form jumping" is the actual name for what I need help with, but basically I'm looking for a script that will make the cursor jump to the next form after a certain number of characters has been typed. I've tried about three or four different scripts but none of them worked for me.

 

Anyone know of a simple-to-use script for this?

Link to comment
https://forums.phpfreaks.com/topic/228864-form-jumping/
Share on other sites

You can add on onkeypress event that will check the length of the input value and focus to the next field. You can review the example below (make sure to use the right id)

<input type="text" onkeypress="if (this.value.length >= 5) document.getElementById('next_field').focus();" />
<input type="text" id="next_field" />

Link to comment
https://forums.phpfreaks.com/topic/228864-form-jumping/#findComment-1179831
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.