I would like to add a feature to a web app I am developing to allow the user to create rules with an expression builder. Such as the one used in Magento (picture in link below).
http://i.stack.imgur.com/ZWgcG.png
I want to allows them to be able to create the expressions or if statements using column names from a table in a Database, then be able to do comparisons and what not. The expression built in the user interface would then evaluate to code that would be evaluated by a PHP script or Javascript or Perl
I searched the web for things like this that are javascript (ajax) based. I figures there has to be a module or something out on the internet somewhere for jQuery or something similar, but I haven't been able to find anything. I am also not quite sure what something like this is called besides "Expression Builder". If there is something like this out there it would save me a lot of time compared to writing it from scratch.
In Mac OS X terms it is called a “predicate editor”, and can be found in Mail.app and iTunes. I had need for one a while ago, and scoured the web from end to end without finding one. I ended up building my own using jQuery, and it looks like this (text is in norwegian, sorry):
Sadly this is used in an internal project and the source code is not available as it is very application-specific. There is a need for a free component like this though, so if I get around to it I will try to clean this up and release it.
This here should be exactly what you're looking for?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With