I have a method that executes when the company_text field is changed. I need to confirm that company name has been entered before company_text (a checkbox) is changed from empty to filled. All of the method works as expected except that the requestFocus just doesn't happen!
If I run the requestFocus on its own it works fine, but at the the end of this method - nothing!
controller.saveData();
if ( company_text == 'company' && company_name ==''||company_text == 'company' && company_name == null)
{
plugins.dialogs.showErrorDialog( "Missing data", "Please enter company name first!", 'OK');
company_text = null;
forms.contacts_card.elements.company_name.requestFocus();
}
does anyone know why the requestFocus is not working?