Yes - you can use the focus option of the form-options object, which you can define using formOptions.main or when you call edit() if you are calling it directly.
You can use the focus option of the form-options parameter. Or alternatively listen for the open option which will tell you what action is being performed and you can then execute the focus() method.
Answers
Yes - you can use the
focus
option of theform-options
object, which you can define usingformOptions.main
or when you calledit()
if you are calling it directly.Allan
Thanks Allan
Hi! Is there a way to choose the focus but in when opening the editor through the "Add" button?
It works for me when something is calling edit(), but not when calling create
Thanks!
What "Add" button? Can you link to the page please?
Allan
Allan,
editor.field(FIELDNAME).focus();
works fine.
But, we how do I change it based on editor action.
So, If its "ADD" / "CREATE" new record
Need focus on different field
While "EDIT" record, need focus on different field.
You can use the
focus
option of theform-options
parameter. Or alternatively listen for theopen
option which will tell you what action is being performed and you can then execute thefocus()
method.Allan