After creating and loading a PDF, K2 form jumps up to hide the PDF from the user

  • 29 January 2018
  • 2 replies
  • 17 views

Userlevel 3
Badge +16

Morning all,

 

Here's one for a Monday to wrap ya brains round...

 

Got a form with a View (the view contains a Save PDF button and a Load File Attachment)

 

The user clicks the Save PDF button and it creates the pdf and the loads it into the File attachment.

 

Problem is, the screen (K2 form) jumps up 2 inches from the bottom of the screen after the PDF is loaded, instead of staying at the bottom so that the user can see the attached PDF, it's moved up and the user doesn't know if its been generated unless they scroll down.

 

My question, why's it doing it?

2nd question, how do i get round this? Is there a way in the rule to say after the file attachment has loaded to stay at the bottom of the screen or something like that?

 

 

 

 


2 replies

Hello,


 


We can use the Execute a Control's method and use the Focus method to focus the form to a particular contorl. We could try adding a control that we will focus to, and simply focus to that control after the PDF is loaded. 

Userlevel 3
Badge +16

Thanks for this suggestion.

 

It was still chopping the button which i wanted to focus on, so I ended up putting a hidden control underneath the button.

 

I set focus on that control and make it visible, then the forms get focus to that control, then i hide the control straight afterwards, job done.

 

Thanks

Reply