Disable focus on edit form
Disable focus on edit form
djmm68
Posts: 20Questions: 7Answers: 0
I need to disable focus on edit form only.
First, I've tried this:
formOptions: { main: { focus: null } }
but that disables focus on both forms (create new record form and edit selected record form). I only want to disable focus on second form (edit selected record).
What options must I use in order to get it?
Thanks in advance!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Option 1:
Option 2 (a better option): if you are using the
edit
option you could actually set the form option there using theformOptions
object, and that will apply to the edit form only.Option 3: if you are using
edit()
directly, you can pass the form options into that method.Allan
Hi Allan, thanks for your reply!
I really consider the second option as the better too, but I'm struggling about how to apply it.
Now, I've tried to config it on buttons, so:
But it seems not to have any result
How should I do it?
I've embarrassed myself here. Option 2 isn't currently possible with the Editor code base as it stands. I had thought that was something I had implemented (was utterly convinced of it!) but looking at the code, only a sub-set of the form options are currently implemented as options for the button.
I'll look into the best way to address that (and make Editor work the way I thought it was!), but perhaps option 1 might be a workaround for now.
Allan
Ok Allan, I understand.
I'll try to do it with first option.
Thank you for your help.
Regards
Jose