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.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

django_splitted_input-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

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

Hashes for django-splitted-input-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7f728d6aae4b4fcac17cb23e2bf3e9ffa5f4b4c913996f3b74fcdb1ddcc75a1f
MD5 dbc2ece4375594fd3435c551a3ab3fab
BLAKE2b-256 7d310da7222cbaed2d785d9c1d80f212e69e80186ac60642a8fe3fc53b925db2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_splitted_input-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e103b5c73c2783a9e820a406c2691eec0b4d0161dc488a1c66ddfa0fb8ad30a
MD5 eb9b6c903fa6d327b936f52b7bca3d37
BLAKE2b-256 a5e45d5b5028f86d6ac1d5d886b18a0a5ae260bb8a5548f9842554fba9e7155b

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