Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
django-split-input
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian
django-split-input
Commits
f3740bfb
Commit
f3740bfb
authored
4 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Create README.md including a picture
parent
20231964
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+34
-0
34 additions, 0 deletions
README.md
django_splitted_input_showcase.png
+0
-0
0 additions, 0 deletions
django_splitted_input_showcase.png
with
34 additions
and
0 deletions
README.md
0 → 100644
+
34
−
0
View file @
f3740bfb
# 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
1.
Install
`django_splitted_input`
and add it to your
`INSTALLED_APPS`
.
```
shell
pip
install
django-splitted-input
```
In your settings.py:
```
python
"
django_splitted_input
"
,
```
2.
Install
`jQuery`
using your preferred method (e.g.
[
django-yarnpkg
](
https://pypi.org/project/django-yarnpkg/
)
)
3.
Create a form with a
`CharField`
.
4.
Use
`SplittedInput`
as a widget and supply the sizes of all input fields.
```
python
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
)))
```
This diff is collapsed.
Click to expand it.
django_splitted_input_showcase.png
0 → 100644
+
0
−
0
View file @
f3740bfb
42.3 KiB
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment