Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Can't get nuPrintEditForm to work

Questions related to using nuBuilder Forte.
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Can't get nuPrintEditForm to work

Unread post by BoydG »

Is there something special I need to do to get the nuPrintEditForm function to hide certain objects?

I've placed the following on a button onclick

nuPrintEditForm('ins_ord_pri_fill')

the print window is displayed, but it's not hiding the object.
On the console nuHide('ins_ord_pri_fill') and nuShow('ins_ord_pri_fill') will hide and show the button, but it won't hide it when passing it as a parameter to the nuPrintEditForm function

I'm on version V.4.5-2023.02.21.01
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Can't get nuPrintEditForm to work

Unread post by kev1n »

Hi,

Pass the objects to hide as array:

Code: Select all

nuPrintEditForm(['ins_ord_pri_fill'])
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Re: Can't get nuPrintEditForm to work

Unread post by BoydG »

nope, that didn't work either, even tried with quotes
nuPrintEditForm("['ins_ord_pri_fill']")
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Can't get nuPrintEditForm to work

Unread post by kev1n »

What type of object is it? If I run this JS in the User form, the Language field isn't shown in the preview window.

Code: Select all

nuPrintEditForm(['sus_language'])
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Re: Can't get nuPrintEditForm to work

Unread post by BoydG »

if open a user and then go to the console, copy and paste what your wrote.
the print preview screen still shows the language field in the print preview
Clipboard01.jpg
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Can't get nuPrintEditForm to work

Unread post by kev1n »

That's odd. I tested it with Chrome, FF, Edge and in all 3 browser, the Language field is not shown in the preview screen.
(If relevant, tested with the latest nuBuilder. But IIRC, nuPrintEditForm() hasn't been updated in a while)
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Re: Can't get nuPrintEditForm to work

Unread post by BoydG »

I'll add some debugging code to that function in the nuForm.js and see if it's even hitting that procedure.
The documentation says it's also defined in nucommon.js but without the parameters.
Maybe it's hitting the wrong procedure.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Can't get nuPrintEditForm to work

Unread post by kev1n »

BoydG wrote: Fri May 12, 2023 9:11 pm The documentation says it's also defined in nucommon.js but without the parameters.
Wiki:
This function is defined in nuform.js
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Can't get nuPrintEditForm to work

Unread post by kev1n »

Also make sure, that the function is not declared elsewhere but with different parameters, a different implementation.

https://streamable.com/mku176
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Re: Can't get nuPrintEditForm to work

Unread post by BoydG »

When I type
nuPrintEditForm
like you did on the console, I don't get the version with the parameters
I get the one in nucommon.js without the parameters

Any idea what could cause that?
Post Reply