Hi ,
I wanted to create a hierarchy using this plugin, Right now what i saw, is it groups the rules together ,but they are not in any hierarchical structure.
Can i customize this plugin, if so how?
price, group(category & price) and name they all are in same level, but what if i want to define that group(category & price) inside the price(1st block) so that when i do get rules, i should get something like this.
Hi , I wanted to create a hierarchy using this plugin, Right now what i saw, is it groups the rules together ,but they are not in any hierarchical structure. Can i customize this plugin, if so how?
{ "condition": "AND", "rules": [ { "id": "price", "field": "price", "type": "double", "input": "number", "operator": "less", "value": 10.25 }, { "condition": "OR", "rules": [ { "id": "category", "field": "category", "type": "integer", "input": "select", "operator": "equal", "value": 2 }, { "id": "price", "field": "price", "type": "double", "input": "number", "operator": "equal", "value": 1 } ] }, { "id": "name", "field": "name", "type": "string", "input": "text", "operator": "equal", "value": "Test" } ], "valid": true }
SO as per this eg:
price, group(category & price) and name they all are in same level, but what if i want to define that group(category & price) inside the price(1st block) so that when i do get rules, i should get something like this.
Please help.
This is what i am expecting to create a json: { "condition": "AND", "rules": [ { "id": "price", "field": "price", "type": "double", "input": "number", "operator": "less", "value": 10.25, "rules": [ { "condition": "OR", "rules": [ { "id": "category", "field": "category", "type": "integer", "input": "select", "operator": "equal", "value": 2 }, { "id": "price", "field": "price", "type": "double", "input": "number", "operator": "equal", "value": 1 } ] } ] }, { "id": "name", "field": "name", "type": "string", "input": "text", "operator": "equal", "value": "Test", "rules": [] } ], "valid": true }