isFormField Method |
Gets a value indicating whether the object represented by this PdfObject instance is a form field.
function isFormField();
None
Type: Boolean
Returns true if this object is a form field; otherwise false.This method should be used to test if an unknown object is a form field. If more specific information about the type of this object is needed, use the getType Method.
//declare event handler function (which accepts an object of type ObjectSelectedEventArgs as an argument) function objectSelectedHandler(evt) { //if this is not a form field if( !evt.obj.isFormField() ) { //move object to top to page evt.obj.setProperties({"top" : 0}); } } //get API class var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance //attach event handler to objectSelected event myApi.addEventListener("objectSelected", objectAddedHandler);