, ,

structured-filter: Generic Web UI for building structured search or filter queries.

structured-filter is a generic Web UI for building structured search or filter queries. With it you can build structured search queries like “Contacts where Firstname starts with ‘A’ and Birthday after 1/1/1980 and State in (CA, NY, FL)”… It is a full jQuery UI widget, supporting various configurations and themes.

Download: https://github.com/evoluteur/structured-filter

Demonstration: https://evoluteur.github.io/structured-filter/index.html

Plugin homepage: https://github.com/evoluteur/structured-filter

Implementation:

Options:

buttonLabelsBooleanDefault : false – The labels of buttons used to manipulate filters. This options applies to the 3 buttons, “New filter”, “Add filter”/”Update filter” and “Cancel” which use icons if the option is set to false.
dateFormatStringDefault : mm/dd/yy – The format for parsed and displayed dates. This attribute is one of the regionalisation attributes. Common formats are: Default – “mm/dd/yy”, ISO 8601 – “yy-mm-dd”, Short – “d M, y”, Medium – “d MM, y”, Full – “DD, d MM, yy”. For a full list of the possib
fieldsObjectDefault : [ ] – The list of fields (as an array of objects with id, label and type) to participate in the query definition. Possible types are: text, boolean, number, date, time, and list.
submitButtonBooleanDefault : false – Shows or hides the “Submit” button.
submitReadyBooleanDefault : false – Provides hidden fields with the conditions’ values to be submitted with the form (as an alternative to an AJAX call).

Methods:

addCondition(data)FunctionReturns : Object – Adds a new filter condition.
clear()FunctionRemoves all conditions.
length()FunctionGets the number of conditions.
removeCondition(index)FunctionReturns : Integer – Removes the condition of the specified index.
val([data])FunctionGets or sets the filter definition (as an array of filters).
valText()FunctionGets the filter definition (as a readable text string).
valUrl()FunctionGets the filter definition (as a URL string).

Screenshots:

How a Loop Through a JavaScript Object?

How a Loop through a JavaScript object?Javascript Objects are Variables Containing Variables.In Java…

How to Search Item in List in JavaScript

Multi Step Form Using HTML and JavaScript

Form is the important part in web design. Form is the primary interface to the user by which user is…

How to Create Custom CSS, jQuery Autocomplete Plugin

Web developers often use autocomplete features in websites as a part of their work. Yet lot of good …

How to Make Sticky Sidebar Using jQuery and CSS

Sticky sidebar is an essential part of web development. Not in all cases but for some cases where ou…

Selectors, Animation, and AJAX – jQuery Tutorial And Examples

By now I’m sure you have grasped at least the basics and simplicity of the jQuery library. Now it’s …