• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Find and replace depending upon dropdown selection

Community Beginner ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Hi

 

In my PDF (built using Acrobat Pro) I have a number of fields containing statements relating to students.  For each field, the user currently edits the default text to match the student’s gender – e.g., a statement might read:

 

“[He/she] accepted a place to study….etc” – with the user deleting either "he" or "she" as a appropriate. 

 

It would be really useful if there were to be a script to essentially find and replace all “he/she” “his/her” and “him/her” statements in text boxes with the correct gender pronoun depending upon gender selection from a dropdown list.  Would this be possible?  Thanks.  

TOPICS
Create PDFs , PDF forms

Views

303

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

I've created a (paid-for) tool that does just that: https://www.try67.com/tool/acrobat-search-replace-text-in-form-fields

If you wish, I could incorporate it into your form so that it automatically applies those changes based on a selection in a drop-down, although this is not as simple as it seems, and I would think twice if I were you before deciding for people (especially students...) what pronouns they should use.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

LATEST

Good point.  You’re certainly right to advise caution with regards ascribing gender pronouns.  I worked something out with event.value.replace, but I think there is too much scope for error when automating the gendering of text – best left be! Thanks for the advice. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Hi Mark

 

Hope you are dong well and sorry for the trouble. As described, you want to find and replace all “he/she” “his/her” and “him/her” statements in text boxes with the correct gender pronoun depending upon gender selection from a dropdown list using script.

 

Please check out the help page https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_developer_guide.pdf and see if that works for you.

 

Regards

Amal

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines