Login

Snippets by axelwass

Snippet List

Dynamic formset without javascript

If using javascript is not an option, you can use something like this code to have a variable number of subforms. This code uses crispy-forms, but it is totally dispensable.

  • formset
  • dynamic-formset
  • formset_factory
Read More

Reusable field forms using crispy-forms

If you need to use some source to construct your form (maybe some database info or some user input), or you use the same fields with the same functionality in various forms and need to write the same piece of code for each of them, then you are looking in the right place. With this snippet you won't have those issues any more. :P This snippet present a way to wean the fields from the form. The code is made using crispy-forms, but the same idea can be applied without using it. Best luck!

  • forms
  • filters
  • reuse
  • reusable
  • form-field
  • crispy-forms
Read More

axelwass has posted 2 snippets.