A widget to have a django text input splitted into multiple HTML inputs.
Project description
django_splitted_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_splitted_input
and add it to yourINSTALLED_APPS
.pip install django-splitted-input
In your settings.py:
"django_splitted_input",
-
Install
jQuery
using your preferred method (e.g. django-yarnpkg) -
Create a form with a
CharField
. -
Use
SplittedInput
as a widget and supply the sizes of all input fields.
from django import forms
from django_splitted_input import SplittedInput
class VerificationForm(forms.Form):
auth_code = forms.CharField(label='Code', widget=SplittedInput(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-splitted-input-0.1.1.tar.gz
.
File metadata
- Download URL: django-splitted-input-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.8.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f728d6aae4b4fcac17cb23e2bf3e9ffa5f4b4c913996f3b74fcdb1ddcc75a1f |
|
MD5 | dbc2ece4375594fd3435c551a3ab3fab |
|
BLAKE2b-256 | 7d310da7222cbaed2d785d9c1d80f212e69e80186ac60642a8fe3fc53b925db2 |
File details
Details for the file django_splitted_input-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: django_splitted_input-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.8.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e103b5c73c2783a9e820a406c2691eec0b4d0161dc488a1c66ddfa0fb8ad30a |
|
MD5 | eb9b6c903fa6d327b936f52b7bca3d37 |
|
BLAKE2b-256 | a5e45d5b5028f86d6ac1d5d886b18a0a5ae260bb8a5548f9842554fba9e7155b |