Copier le lien dans le Presse-papiers
Copié
Hi,
Im very inexperienced in Adobe and have recently begun creating some forms for users to fill in.
I need to know how I can make the field automatically change what ever has been written in a text box to uppercase, and also if its possible just to change the first letter to upper case.
any help is greatly appreciated.
Thanks
Copier le lien dans le Presse-papiers
Copié
You can use the custom format script, like this:
To convert the inserted value to all upper-case:
event.value = event.value.toUpperCase();
To convert just the first letter to upper-case:
event.value = event.value.substring(0,1).toUpperCase() + event.value.substring(1);
Copier le lien dans le Presse-papiers
Copié
You can use the custom format script, like this:
To convert the inserted value to all upper-case:
event.value = event.value.toUpperCase();
To convert just the first letter to upper-case:
event.value = event.value.substring(0,1).toUpperCase() + event.value.substring(1);
Copier le lien dans le Presse-papiers
Copié
Thanks for the super fast response try67, i will give it a go now and see how it works.
On a different note, is there any way to export(or update) the filled data to a .csv file
Copier le lien dans le Presse-papiers
Copié
Yes, in Acrobat X go to Tools - Forms - More Form Options - Manage Form
Data - Import Data or Export Data
Copier le lien dans le Presse-papiers
Copié
worked GREAT!! U saved me a lot of headache, thanks again.
Final question, is it possible to have the first letter of every field in the form be capital? or must I do the above forumla for individual fields?
Copier le lien dans le Presse-papiers
Copié
You need to apply it to each field separately, but this can also be done
with a script.
The best way is to place the code in a doc-level function, and then call
that function from the fields' formatting code.
Copier le lien dans le Presse-papiers
Copié
all working now
Still cant figure out the export form filled data. When I select XML it starts to OCR and takes a while as it does the whole document. I only want the filled data to be exported to .csv
Copier le lien dans le Presse-papiers
Copié
I figured out how to do it for each field separately, but I don't know how to do it for multiple fields at a time. Can you explain more? Thanks.
Copier le lien dans le Presse-papiers
Copié
Guys, someone could be so kind to share me a PDF example with the working script please?
Copier le lien dans le Presse-papiers
Copié
This really helped but I ran into one issue.
It works great for 1 word that has been input as lowercase. Is there an option for inputs of all caps? or if there is an hyphenated name?
The examples below arent producing the desired results. Is this possible?
THOMAS should change to Thomas but it remains THOMAS
thomas jones should change to Thomas Jones but it changes to Thomas jones
thomas-jones should change to Thomas-Jones but it changes to Thomas-jones
Thanks!
JT
Copier le lien dans le Presse-papiers
Copié
It's possible, but it will require a much more complex script. You would need to first split the name string using a regular expression with all of the characters that you want to use as the delimiters, then edit each "word" (ie, item in the array of the split method), and then re-combine the values in the array using the same delimiters as before...
Copier le lien dans le Presse-papiers
Copié
Yeah, thats a little too intricute.
What about the all caps to proper? Is that one difficult too? i.e. THOMAS beinf forced to Thomas. Is that easily workable?
JT
Copier le lien dans le Presse-papiers
Copié
Sure. You can use this code for that:
var name = event.value;
var words = name.split(" ");
for (var i in words) words = words.charAt(0).toUpperCase() + words.substring(1).toLowerCase();
event.value = words.join(" ");
Copier le lien dans le Presse-papiers
Copié
Copier le lien dans le Presse-papiers
Copié
And I want to Capatilize each word then what is the Formula
Copier le lien dans le Presse-papiers
Copié
Look at reply of try67.
Copier le lien dans le Presse-papiers
Copié
please provide javascript to change it to proper case
Copier le lien dans le Presse-papiers
Copié
Look at the replies!
Copier le lien dans le Presse-papiers
Copié
i am a new user cant find replies please copy paste in my reply
Copier le lien dans le Presse-papiers
Copié
You can see the replies here:
https://community.adobe.com/t5/Acrobat/Change-text-to-uppercase-in-a-PDF-Form/td-p/3941562
Copier le lien dans le Presse-papiers
Copié
But Dear it does not capatilize first letter in each word it only capatilize 1st word of a sentence
Copier le lien dans le Presse-papiers
Copié
And I want to Capatilize each word then what is the Formula
Copier le lien dans le Presse-papiers
Copié
Try67,
Do you have a script to capitalize the first letter of every word in a string?
For example:
"1 first street" to "1 First Street"
Copier le lien dans le Presse-papiers
Copié
Look at reply of try67.
Copier le lien dans le Presse-papiers
Copié
So as I read it, it requires a much more complex script.
and this script is just for "Proper sentencing"
var name = event.value;
var words = name.split(" ");
for (var i in words) words = words.charAt(0).toUpperCase() + words.substring(1).toLowerCase();
event.value = words.join(" ");
Trouvez plus d’idées, d’événements et de ressources dans la nouvelle communauté Adobe
Explorer maintenant