LittleCub Forms

Light-Weight, High-Performance & Easily Customizable

Control for single-line text and as the default control mapped to string data type.

List of supported JSON schema keywords.

List of supported LittleCub config options.

Example 1 :

Text control with only string data parameter.

Native API

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

jQuery API

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

Example 2 :

Text control with data and configs parameters.

Native API

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

jQuery API

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

Example 3 :

Text control with data, configs and schema parameters.

Native API

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

jQuery API

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

Example 4 :

Text 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('text-control-4')).validate();

jQuery API

var textControl4j = $('#text-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();