Set page in multipage as default (v2023)

dear all, i have using phpmaker 2023

i have multi-page : tabs

and i have page label : page 1, page,2, page 3,

as default page1 is active,

how do i make page2 as active page when i press add button or edit button

thank you

You might want to try adding this code:

$this->MultiPages->Items["2"]->Active = true;

In Here:
Table-Specific -> Add/Copy Page -> Page_render
And here:
Table-Specific -> Edit Page -> Page_render

PHPMaker automatically sets the focus to the first input field by default,
you may need to add this:

ew.Form.autoFocus = false;

In Here:
Client Script -> Table-Specific -> Add/Copy Page -> Client Script
And here:
Client Script -> Table-Specific -> Edit Page -> Client Script

This is to prevent the active tab from reverting from Tab 2 back to Tab 1
(assuming the first field is located on Tab 1).