Finds and returns the field object or its index.
get([field], [returnIndex])

field | string, name of the field (optional)
returnIndex | boolean, if true returns index in the fields array (optional)

Returns object, integer, or null.

#### Description

This method will find the field object in the .fields array and return it or its index. If the field does not exists it will return null. Because JavaScript passes objects by reference, modifying this object will modify the original field. If the second optional argument returnIndex is set to true, the method will return index of the field in the .fields array.
If you call .get without any arguments, it will return you an array of all field names.
If you have form defined in the following way: $('#form').w2form({ name : 'form', url : 'server/post', record: { field_1 : 1, field_2 : 2 }, fields: [ { name: 'field_1', type: 'text', required: true }, { name: 'field_2', type: 'alphanumeric', required: true } ] }); You can do: // update field object var field = w2ui['form'].get('field_1'); console.log(field);