Q-UI Suite: Smart Form Engine

Smart Form
Smart Form is not a UI component but a prediction Engine that can be attached to all generic Forms UI. Smart Form Prediction Engine is designed to help create Form that reduces manual data entry redundancy. Smart form algorithm stores the user entered values for form fields and uses them to calculate the appropriate values based on frequency and combinations.

• PredictionTree
• PredictionController
• PredictionModel

How to use Smart Form Prediction Engine ;
It is a 4 step process:-
1. Draw form UI with any custom logic and append below html attributes to the fields:-
   a. data-intel: true; If want the prediction engine to remember/predict this fields value.
   b. data-w: number; Weightage/order for the field prediction.
   c. Id: All form fields should have unique Ids.
input type="textbox" class="form-control" data-intel=true data-w="1" id="desc_01">

2. Setup PredictionTree with unique name: This is a onetime process; Plugin creates a prediction holder in the browser local storage that would hold the form specific learnings.

Sample Code:
var predictionTree = new PredictionTree('userCreateFormUID');

3. Attach PredictionTree:learn() event to form submit : This event invoks the plugins learning process which uses the form submitted values to be stored in the prediction tree.

Sample Code:

4. Attach PredictionController:Predict() event to form fields onChange handler: This event returns the predicted value for the field.

Sample Code:

Posted in Q-UI Suite and tagged , .

Leave a Reply

Your email address will not be published. Required fields are marked *