Skip to main content
yanksgirl
Inspiring
September 24, 2026
Question

Remove percent sign from end of mapped field

  • September 24, 2026
  • 6 replies
  • 20 views

Good afternoon,

I have a form I’m building that brings mapped fields from our Core system into the PDF.  One of those fields is an interest rate (AP_1_INTEREST_RATE).  This field comes in from the core as the number and a % sign, i.e. 1.99%.  That would be great, however, the line on the PDF that it is populating on has a static % sign already, so on the form it looks like 1.99%%.  I cannot for the life of me figure out how to strip the % from the mapped field (AP_1_INTEREST_RATE).  I also have the field format as NONE so it isn’t gaining the % because of the way I have it formatted, it’s coming from the core that way.  

 

Sorry if this is a dumb question but I am a novice and just can’t figure this out. I know how to ADD things but can’t figure out how to remove them.   Any help would be appreciated!

    6 replies

    Anand Sri Bhattacharya
    Community Manager
    Community Manager
    September 24, 2026

    Hello @yanksgirl,


    I hope you are doing well, and thanks for reaching out and sharing the details. Sorry for the trouble you had.


    Could you please share more details about the workflow/issue?


    1. Which Acrobat product is being used: Acrobat Pro, Acrobat Standard, or Acrobat Reader?

    2. Is the form an AcroForm PDF created with Prepare a form, and is AP_1_INTEREST_RATE it a standard text field?

    3. Is the mapped value populated by JavaScript, an external/core-system integration, or imported form data?

    4. Which platform is affected: Windows or macOS, and what exact Acrobat version/build is installed? Check from Menu > Help > About Adobe Acrobat.


    The key thing you have already worked out is correct: your field format is None, so Acrobat is not adding the "%". The value is arriving from your Core system as the literal text "1.99%", and because your form line already prints a static "%", you end up with "1.99%%". So the goal is to remove the "%" character that is baked into the incoming value.


    Assuming this is a form authored in Acrobat (an AcroForm) rather than LiveCycle/XFA, here is the way to do it.

    To strip the "%" from the value:

    1. Open the form in Prepare Form mode and double-click the AP_1_INTEREST_RATE field to open its Properties.

    2. Go to the Validate tab.

    3. Select Run custom validation script and click Edit.

    4. Enter this single line, then click OK and Close:

    5. event.value = event.value.replace(/%/g, "");


    Please note that this is a sample script. You may need to edit or modify it according to your requirements, system environment, and app version.


    This removes every "%" from the field value, so "1.99%" becomes "1.99", and with your pre-printed static "%", the line then reads "1.99%" as intended. A Validate script is the right place because it changes the committed value of the field. A Custom Format script would only change the on-screen appearance and leave the underlying value untouched, which matters if the value is used anywhere else. For more details, please refer to these articles:

    https://adobe.ly/4hkzHBf

    https://adobe.ly/4dyxUYc


    If you only want to change what is shown and keep the raw value intact, you would instead use Format tab > Custom > Custom Format Script with the same line, but for your case, Validate is usually what you want.

    One thing to check: a Validate script runs when Acrobat processes the field value change. If your Core system pushes data into the field through an import or mapping process that does not trigger the field's events, the script may not fire on its own. If that turns out to be the case, the cleaner fix is to strip the "%" at the mapping/import step, or to handle it with a calculation script instead.


    I hope this helps, and let us know how it goes. Please reach out if you have any questions or need any assistance.


    Regards,

    Anand Sri.

    yanksgirl
    yanksgirlAuthor
    Inspiring
    September 24, 2026

    Hi Anand!

    I am using Adobe Pro.  Correct, the field is coming over from our core as 1.99%.  The form also has static text (that I can’t remove) of % so it is populating as 1.99%%.  I was attempting to use a slice calculation script to remove the % but can’t figure out how.  

    yanksgirl
    yanksgirlAuthor
    Inspiring
    September 24, 2026

    Also, the value isn’t used anywhere else so a validation script might not be best because I don’t think the population by the core would trigger it?