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.
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.
Copy link to clipboard
Copied
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.
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