Skip to content

Assystant/dynamic-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynamic-form

A simple package to set dynamic fields for a form.

Features :

  1. It contains 7 field types - Text, TextArea, Radio, Checkbox, Dropdown, File Upload.
  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 fieldvalidations. 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 willl 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.

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.

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