The field store manages all the registered fields and contains the FieldListener objects. It can be accessed in the browser from window._nb.fields.


This method will return an array containing all the registered fields as FieldListener objects.

// [FieldListener, ...]


This method will return an array containing FieldListener objects for a specific element node.

var ele = document.querySelector('#my-field');
// [FieldListener]


This method is called after the page is loaded to register fields when autoFieldHookup is enabled. It will look for any fields using the email type, containing the data-nb attribute or contain the selector specified in selector option.


registerListener(ele [, broadcastRegisration])

This method will register the specified element with the widget. It accepts two arguments, the first being the node to register and the second being an optional boolean. When set to false, the second argument allows you to silently register a node without it broadcasting the nb:registered event. This argument defaults to true.

// Second argument is optional, it defaults to true
var ele = document.querySelector('#my-field', true)


This method will unregister all the fields from the widget. (See unregisterListener)



This method will unregister the specified field. It will call the destroy method in the FieldListener object.

var ele = document.querySelector('#my-field', true)