LittleCub Forms

Light-Weight, High-Performance & Easily Customizable

Control that services as container for other controls and as the default control mapped to object data type.

List of supported JSON schema keywords.

List of supported LittleCub config options.

Example 1 :

Object control with only string data parameter.

Native API

var textControl1 = LittleCub("Sample", null, null,document.getElementById('object-control-1'));

jQuery API

var textControl1j = $('#object-control-1-j').lc("Sample1 with jQuery");

Example 2 :

Object control with data and configs parameters.

Native API

var textControl2 = LittleCub("Sample2", {
    "type" : "text",
    "size" : 60
}, null,document.getElementById('object-control-2'));

jQuery API

var textControl2j = $('#object-control-2-j').lc("Sample2 with jQuery", {
    "type" : "text",
    "size" : 60
});

Example 3 :

Object control with data, configs and schema parameters.

Native API

var textControl3 = LittleCub("Sample3", {
    "type" : "text",
    "size" : 60
}, {
    "type" : "string",
    "minLength" : 10
},document.getElementById('object-control-3'));

jQuery API

var textControl3j = $('#object-control-3-j').lc("Sample3 with jQuery", {
    "type" : "text",
    "size" : 60
}, {
    "type" : "string",
    "minLength" : 10
});

Example 4 :

Object control with configs and schema parameters that have various options.

Native API

var textControl4 = LittleCub("", {
    "type" : "text",
    "size" : 60,
    "label" : "Sample 4",
    "helper" : "Enter your sample text",
    "placeholder" : "Sample Text",
    "required" : true,
    "validationEvent" : "keyup"
}, {
    "type" : "string",
    "title" : "Sample",
    "description" : "Enter sample text",
    "minLength" : 10,
    "maxLength" : 30
},document.getElementById('object-control-4')).validate();

jQuery API

var textControl4j = $('#object-control-4-j').lc("", {
    "type" : "text",
    "size" : 60,
    "label" : "Sample 4",
    "helper" : "Enter your sample text",
    "placeholder" : "Sample Text",
    "required" : true,
    "validationEvent" : "keyup",
    "name" : "sample"
}, {
    "type" : "string",
    "title" : "Sample",
    "description" : "Enter sample text",
    "minLength" : 10,
    "maxLength" : 30
}).validate();