Adding default values in JQuery jTable add/edit forms

Alen smit picture Alen smit · Dec 27, 2012 · Viewed 8.9k times · Source

I am using JQuery jTable plugin in my web application. I have to set some fields in the add/edit form of jTable while loading the form. There is a callback for getting control while creating the form.

formCreated: function (event, data) 
{

}

I can access the input elements also through

data.form.find('input[name="Name"]')

But, How will I set some default value in these input elements??

Answer

hikalkan picture hikalkan · Jan 8, 2013

Use defaultValue propert of jTable. See documantation: http://jtable.org/ApiReference#fopt-defaultValue