Skip to main content
Inspiring
July 15, 2023
Answered

campo data

  • July 15, 2023
  • 1 reply
  • 1019 views

Tenho um campo texto com o nome de data_actual, ao abrir o ficheiro em pdf ele busca a data atual.

Coloquei o seguinte javascript nele:

 

this.getField("data_actual").value = util.printd("dd/mm/yyyy", new Date());

 

O problema é que ele não actualiza o que devo fazer? aparece sempre a data anterior exibida nele

This topic has been closed for replies.
Correct answer try67

You need to move the code to a Doc-level script, under Tools - JavaScript - Document JavaScripts.

Make sure it's NOT in a function, though.

1 reply

try67
Community Expert
Community Expert
July 15, 2023

Where did you place the code, exactly?

Inspiring
July 16, 2023

Boa noite,

Coloquei em:

Propriedades - Calcular - Script de Calculo personalizado.

Inspiring
July 16, 2023

You need to move the code to a Doc-level script, under Tools - JavaScript - Document JavaScripts.

Make sure it's NOT in a function, though.


Não entendi: Make sure it's NOT in a function, though.

E copio o meu codigo todo?