Skip to main content

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.

django_split_input Showcase

Usage

  1. Install django_split_input and add it to your INSTALLED_APPS.

    pip install django-split-input
    

    In your settings.py:

    "django_split_input",
    
  2. Install jQuery using your preferred method (e.g. django-yarnpkg)

  3. Create a form with a CharField.

  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-split-input-0.2.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

django_split_input-0.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file django-split-input-0.2.0.tar.gz.

File metadata

  • Download URL: django-split-input-0.2.0.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

Hashes for django-split-input-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d4688801ce4b2443b121c740d6e52af72f8624b67034fc10e9a7720e00da03c2
MD5 6527516abd7f6eefebf9f1471a548e8d
BLAKE2b-256 dcbcb8a504c9aa71c5f1fc427e7696ba3e03f4445be832665f86f1fb4c0f0b71

See more details on using hashes here.

File details

Details for the file django_split_input-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_split_input-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33930c6aff7d011e6bdd0bfdbf4b84e12c2b8ce9f297f745fa630da579c4831f
MD5 5c5e9eeeeadee11274ba96d74ddbf0d4
BLAKE2b-256 03481994afc8853959e689d72c243a8ac4f3403539eb3bce65b51da156245211

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page