Skip to main content

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.

django_splitted_input Showcase

Usage

  1. Install django_splitted_input and add it to your INSTALLED_APPS.

    pip install django-splitted-input
    

    In your settings.py:

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

  3. Create a form with a CharField.

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


Download files

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

Source Distribution

django-splitted-input-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_splitted_input-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file django-splitted-input-0.1.0.tar.gz.

File metadata

  • Download URL: django-splitted-input-0.1.0.tar.gz
  • Upload date:
  • Size: 2.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-splitted-input-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4146806bf5fbc0d8bc275593535d4c61dd68a21efe59188ddc111cac3bc7c1fa
MD5 8df8e0cb75c2edab51a757306ea17817
BLAKE2b-256 027567402337a3ef455bd4665b53b0694eb19e56a0c428a39dca616842470c81

See more details on using hashes here.

File details

Details for the file django_splitted_input-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_splitted_input-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89f35266ce920c88bd28d694f2a274ec05bc7826cd0adf2b2ad23f7b43016fed
MD5 c08f1a8c6385f2aa9201821afb641c34
BLAKE2b-256 663f3b3c3a44018103c8ba00171849790d7586967852060709c83e8cfcec8b8f

See more details on using hashes here.

Supported by

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