Placing cursor in a field

V

Victoria

When the user clicks and inserts an optional section, the whole section
appears highlighted in blue and the whole section is selected.

Besides looking weird, this is cumbersome to the user.

How can I automatically move the cursor from section selection to be inside
the first field, so the user can just start typing without having to click in
the first field.

I'd also like to do this with an optional section that has no fields in it
(they are basically "help" sections)... make it so it is not selected and not
blue.

Thanks in advance, Victoria
 
B

Ben Walters

Hey Victoria,
One way to do this is to add some custom code behind your form,
firs you need to add an OnAfterInsert event for your section, then you can
add the following code to move the focus

e.XDocuement.View.SelectNodes("//my:myFields/my:OptionalSection/my:FirstField",Type.Missing,Type.Missing);

if you need more detail let me know

Cheers
Ben
 
Top