Skip to main content
Known Participant
May 14, 2024
質問

C'è un modo per inserire in un campo modulo ogni lunedi la data

Buongiorno, chi mi aiuta ad inserire in un campo modulo "data" con aggiornamento della data in automatico ogni lunedì.

grazie

このトピックへの返信は締め切られました。

返信数 1

try67
Community Expert
Community Expert
May 14, 2024

What do you mean? Do you want the field to show the latest Monday whenever the file is opened?

 

Known Participant
May 14, 2024

NO! Es: se oggi 13/05/24 ed è lunedì, voglio che il campo "data" si aggiorni in automatico al prox lunedi 20/05/24 e così via..

grazie

Known Participant
May 14, 2024

OK! ... You can do it by placing this code as a doc-level script in your file:

 

var d = new Date();
while (d.getDay()!=1) d.setDate(d.getDate()+1);
this.getField("date").value = util.printd("dd/mm/yyyy", d);

fantastico!