Skip to main content
first.officer
Inspiring
September 26, 2021
Question

Print button not working on re-filling in form.....

  • September 26, 2021
  • 1 reply
  • 628 views

Hi all,

 

Am wondering if anyone can spot why I am having the following issue....I have the following set-up (see below), whereby upon entering a signature (form is used on an iPad), the buttons used are ordered to reveal in a set order, to ensure the user follows a 'flow'. This works perfectly for the first instance of use, and when completeing the last action (reset), everything is as expected other than when the user then fills-in the form again for a second (and subsequent times), the "Printbutton" is revealed as per design, but does not re-open a Print Dialogue option, when it is pressed (everything otherwise as an action i.e. reveal the "Emailbutton" etc. works perfectly!).

 

Any ideas? the flow is as follows;

 

Signature Field ("Signaturelast") - this script executes when the field is signed
this.getField("Printbutton").display = display.visible;

 

Print Button ("Printbutton")
Mouse Down
        Execute a menu item
        File>Print...
        Show/hide a field
        Show "Emailbutton"

 

Email Button ("Emailbutton")
Mouse Down
        Submit a form
        Show/hide a field
        Show "Resetbutton"

 

Resetbutton ("Resetbutton")

Mouse Down
        Run a javascript
        this.getField("Hours").value = this.getField("Totalhours").value;

Mouse Up
        Reset a form (resets all chosen fields EXCEPT some specified fields that are 'carried forward')
        Run a javascript
        this.getField("Printbutton").display = display.hidden;
        this.getField("Emailbutton").display = display.hidden;
        this.getField("Resetbutton").display = display.hidden;

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
September 26, 2021

I recommend you do it all using a single script, instead of separate commands.

To open the Print dialog use this code:

this.print();

first.officer
Inspiring
September 26, 2021

Hi try67,

 

Many thanks for the response - I did try the "this.print();" script, but sadly doesn't seem to be supported on an iPad (using Fluix), as no opening of the Print dialog function....hence I have had to stick with the normal method, which only seems to work in the first instance....

 

 

try67
Community Expert
Community Expert
September 26, 2021

I'm surprised to hear it works at all on a mobile device...