Denis Callau
Denis Callau

Reputation: 285

Django Dynamic Form Filter

I'm creating a web based ERP-like system in Django 2.0. In a page, I have a form with all the Work Orders or so entries (stored in DB).
I would like to have in the first line of the form (below the headers) a input field for each column where I type and it dynamically/instantly filter the form rows.

Example:

     COD      |  DESCRIPTION   |      DATE      |      ETC.
search field  |  search field  |  search field  |  search field

So when I type any character in any column, instantly the form is updated showing the filter results. Which technique I should use for this? Is Ajax the tool for this job?

Upvotes: 1

Views: 59

Answers (1)

Theodore Howell
Theodore Howell

Reputation: 428

AJAX is the tool, reference Djangos RESTful API. I use AJAX and the RESTful api to handle all of those neat form tricks, including username availability, or even a validator for the input. If you would like more guidance on how to do this, I will glady help out!

Upvotes: 1

Related Questions