Skip to main content
Participating Frequently
May 7, 2020
解決済み

Java script Help!

I'm trying to create a format for a field in my PDF.

 

Custom Format Script:

event.value="/" +event.value + "/";

 

Custom Keystroke Script:

event.rc = /^[A-Z]*$/.test
(event.change);

 

I'm hoping the outcome that the what ever is entered in this field starts with "/" and ends "/". - when testing for e-sign, it did not warn the signor to use the "/" and "/" and they were able to move to hte next field and sign the document.

 

How can build this script to make it a requirement?

このトピックへの返信は締め切られました。
解決に役立った回答 try67

I meant, do I remove the format script and put that in the validation?*


Yes, remove that script and add this one instead:

if (event.value) event.value = "/" + event.value.replace(/^\//, "").replace(/\/$/, "") + "/";

返信数 12

try67
Community Expert
Community Expert
May 7, 2020

Do you want the field value to actually have those characters in it, or just to appear as if it does?

If the former then using the Format event will not achieve that. You can use the Validation event to force it.

NDAQ作成者
Participating Frequently
May 7, 2020

I want the field to actually have those characters.  Would I get rid of teh keystroke script and add that to the validation?

 

 

NDAQ作成者
Participating Frequently
May 7, 2020

I meant, do I remove the format script and put that in the validation?*