Copy link to clipboard
Copied
Bonjour,
Je crée un formulaire sur Adobe Acrobat Pro et je souhaiterais pouvoir afficher un message d'erreur lorsque la personne a atteint la limite de caractères autorisée par le champ de texte.
Je sais limiter le nombre de caractères, mais la personne qui remplit n'est pas informée lorsqu'elle atteint la limite. Si elle copie-colle un texte trop long, la fin ne sera pas prise en compte et elle ne le saura pas. Je voudrais avoir un message "Attention, vous avez atteint la limite de X caractères."
Est-ce possible ?
Merci d'avance
Copy link to clipboard
Copied
Yes, using a script. Remove the Character Limit setting and instead use this code as the field's custom Keystroke event (under Properties - Format - Custom):
if (AFMergeChange(event).length>10) {
app.alert("Attention, vous avez atteint la limite de 10 caractères.",1);
event.rc = false;
}
It's possible the code will "disappear" after you apply it, due to a bug in Acrobat, but it should still work.
Copy link to clipboard
Copied
Yes, using a script. Remove the Character Limit setting and instead use this code as the field's custom Keystroke event (under Properties - Format - Custom):
if (AFMergeChange(event).length>10) {
app.alert("Attention, vous avez atteint la limite de 10 caractères.",1);
event.rc = false;
}
It's possible the code will "disappear" after you apply it, due to a bug in Acrobat, but it should still work.
Copy link to clipboard
Copied
Super, ça fonctionne ! Merci !!
Copy link to clipboard
Copied
Bonjour,
Ce code m'interesse mais je ne sais pas où le "coller".
En effet dans le menu (under Properties - Format - Special), je ne peux pas coller de code. Et dans Properties - Format - personnalisée je ne sais pas où le mettre. Du coup ce code est inactif dans mon formulaire.
Version ADOBE ACROBATE PRO version 2023.003.XXX
Merci pour votre aide
Copy link to clipboard
Copied
Sorry, I made a small mistake above. It should go under Properties - Format - Custom, not Special.
Then use the Keystroke event (the lower of the two):
Click Edit and then paste the code into the window that opens. Like I said, it's possible the code will "disappear" after you do that, but it should still work.
Copy link to clipboard
Copied
TOP !!! merci...
Copy link to clipboard
Copied
Merci pour votre réponse et votre aide !