A widget to have a django text input split into multiple HTML inputs.
Project description
django_split_input
About
This is a django widget for multiple fixed size inputs for one form field. These could be used for those super fancy verification code forms. The cursor is moved to the next input field using JS/jQuery.
Usage
-
Install
django_split_input
and add it to yourINSTALLED_APPS
.pip install django-split-input
In your settings.py:
"django_split_input",
-
Install
jQuery
using your preferred method (e.g. django-yarnpkg) -
Create a form with a
CharField
. -
Use
SplitInput
as a widget and supply the sizes of all input fields.
from django import forms
from django_split_input import SplitInput
class VerificationForm(forms.Form):
auth_code = forms.CharField(label='Code', widget=SplitInput(sizes=(3, 3, 3)))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-split-input-0.2.2.tar.gz
.
File metadata
- Download URL: django-split-input-0.2.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1+ Linux/5.10.0-2-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1082b4f183dcaf549127d7ec65b0fdb4497dd263cde7cc6be11ac0736a2a2ec |
|
MD5 | 1a7cacb5134a6284a3f487dada3d195b |
|
BLAKE2b-256 | 97dc333c10a92e76f70ce2ab12626a2371251104afac08b7c07bf71748a08b13 |
File details
Details for the file django_split_input-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: django_split_input-0.2.2-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1+ Linux/5.10.0-2-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b225c3896e2340678a5bc1f0640e19772a800f7d667e128e757efecfa2f9bfa |
|
MD5 | 6d05da5364000b858f48d57788cc8581 |
|
BLAKE2b-256 | 979a0b0156a657b8e17a90814786b9c9689f8343e66b393144b69a05059581d4 |