Expand my Community achievements bar.

SOLVED

Regarding set focus on panel during save as draft

Avatar

Level 4

Hi Folks,

The default save functionality provided for forms via the categories "fp.saveAsDraft" saves the form. The form that is saved when opened from draft, opens with the panel that was active when the user last clicked save button. I tried to figure out how the panel is made active when opening the form but did not find the same.

Can any one let me know how active class is added to the panel and wizard elements when a form is opened.

 

Regards -

Ashok Deivasigamani

1 Accepted Solution

Avatar

Correct answer by
Level 1

Hi,

While saving the draft, last focus item information is also saved along with data. While reloading a draft, the som expression of that last focused item (retrieved from reloaded draft) is passed to  window.guideBridge.setFocus("<som expression>") API to set the focus to that element if it is focus-able, otherwise focus is set on its nearest focus-able parent element.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 1

Hi,

While saving the draft, last focus item information is also saved along with data. While reloading a draft, the som expression of that last focused item (retrieved from reloaded draft) is passed to  window.guideBridge.setFocus("<som expression>") API to set the focus to that element if it is focus-able, otherwise focus is set on its nearest focus-able parent element.

Avatar

Level 4

Thanks for the info, I wish to dig deep and find out where the somExpression is stored. The reason behind this is, The navigator component in my case is customized for the layout, so inorder to highlight the panel in focus, I need to manipulate the JS to add classes to the panels that the user has already completed or the panels that are before the current panel that is set focus.

 

Regards -

Ashok D