Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > JavaScript API > SearchField object > Methods

JavaScript API: SearchField object > getName()

Scroll Prev Next More


Returns the name of the field.


var fName = field.getName();


No arguments.

Return value

Returns name of the current field.


Get the field name of the search field using the JavaScript OnLoad event:


var srch = pageObj.getSearchController();
var field = srch.getSearchFields()[0];
var fName = field.getName();

See also:

JavaScript API: SearchController object (deprecated)

About Search API

Events: JavaScript OnLoad

JavaScript API: SearchField object

JavaScript API