lundi 27 novembre 2017

If conditions based on number of inputs fields filled

I am currently attempting to do an Advanced Search function. Currently, I have a form with 7 possible input fields. What I am trying to achieve is that as users fill in the form fields, these fields will determine the conditions set for my backend to "filter" out the data.

Hence, if a user fields in 2 fields out of the 7, these 2 inputs fields will be used as my backend's filter conditions. If another users fills in 3 input fields out of the 7, then 3 conditions, and so on. Thus, users can choose to fill in any possible combinations/number of inputs: minimum 1 and maximum 7. The conditions will only be set when the input field is filled. (Hope you guys understand where I am coming from hahaha)

Thus, I would like to ask, how do I go about approch to doing this?

Aucun commentaire:

Enregistrer un commentaire