These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Multi page forms where focus keeps returning to first page

PetafromOz
Registered: Jun 8 2009
Posts: 230

I've got a few multi page forms, when I simply want the focus at the end of each page, to go to the first field on the next page in the form. Sometimes this happens and sometimes it doesn't and I can't figure out what is different in each case.

Otherwise it just keeps returning to the beginning of the first page.

I've tried doing an 'xfa.host.setFocus(pageno.fieldname)', but it doesn't always make a difference. I've also checked the tabbing order - and for each new page it restarts at 1. But what is weird is that in the case of some forms, that makes no difference and it works fine, yet in others it doesn't.

Does anyone have any clue what the problem is please and how I can fix it?

from way... underground at Parkes - central West NSW - Australia

suewhitehead
Registered: Jun 3 2008
Posts: 232
When I had a similar problem, it was because the name of the fieldname was the same as a field name on another page.

I decided to use a different approach that you might like. In the script below, the field name is RATitle. It is the only field I have in the form with that name. The .. means it will search for that field name. I put the script on a button that takes the user to that page, but you could use the same thing for focus.

var oRA = xfa.form.resolveNode("$..RATitle");
var nPage = xfa.layout.absPage(oRA);
xfa.host.currentPage = nPage;