Skip to main content
Participant
August 25, 2021
Question

format auto fill text to all caps

  • August 25, 2021
  • 1 reply
  • 546 views

I'm not sure if there is a way to do this or not, but here is my situation and question.

I have created a form that auto-fills a user's name, which is pulled from the LMS system (Absorb LMS) so it will give them a "certificate" when they complete a course. The PDF form I have created is the certificate. What I want is for their name (which is uppper and lower case in the system) to come out as all caps on the PDF certificate.

 

I've tried the other scripts such as

event.value = event.value.toUpperCase(); and

event.value = event.value.toString().toUpperCase() ; and even

if(!event.WillCommit)event.change = event.change.toUpperCase() ;

but I these don't seem to work and I think it could be because they are not typing in their name--it is being autofilled with information that is pulled directly from the system.

 

So my questions are

1) is there actually a way to make this happen?

2) if so, what is the script? (I don't know anything about writing my own scripts, but am quite adept at copy and paste. 

Any direction in this area would be appreciated.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 25, 2021

The issue is that importing the data is not triggering any events, so your code never gets a chance to work.
If you apply the first code you posted as the calculation script of your field then you just need to force a calculation when the file is opened, and it should work.

To do that embed the following as a doc-level script:

this.calculateNow();