Skip to content

Assystant/dynamic-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynamic-form

A simple package to set dynamic fields for a form.

Features :

  1. It contains 10 field types - Text, TextArea, Radio, Checkbox, Dropdown, Multi Select, File Upload, Name, Email, Phone, Currency, Signature
  2. It contains 7 models (logically grouped into 2-set of models) -
    a. The first group of 4 models is used to create a custom form with fields, its field options (for radio/checkbox/dropdown field_types), and field validations. Below is the relation representation of models.
    image

b. The second group of 3 models is used to store user values for generated form.
User Input data can either be in the form of text (that will be stored in UserInputText Model), or fieldOptions (predefined in FieldOption Model), or attachments (that will be stored in UserInputFileUpload Model).
UserInput Model - This is the main model to store user-filled data. It contains 4 fields (all foreign keys) -

  1. user (to identify which user's data),
  2. template (to identify which template is used),
  3. field (to identify which field is filled in that template),
  4. GenericForeignKey (actual foreignkey of user-entered-value : can be UserInputText/ FieldOption/ UserInputFileUpload).
  5. It contains features like sorting of fields for every template, a boolean value to declare field is required or not.
  6. It also generate unique identifiers for each form and it's corresponding fields to allow using them as variables to retrieve specific value from a submission to be used programmatically.

TODO :

  1. Automatic setting scores for sorting the fields.
  2. Adding restrictions for GenericForeignKey content_type field to these 3 models only UserInputText/ FieldOption/ UserInputFileUpload.
  3. Signature File tracking and telemetry (potentially with a separate package)

Installation guide :

pip install git+https://github.com/Assystant/dynamic-form.git

Documentation :

link

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages