Copy link to clipboard
Copied
Hi i made a button who triggers outlook to open a mail. but my problem is that it works even when all the required fields isnt filled out.
My current code is
this.mailDoc(true, "",
"cc@mail.com", "" ,"Titel","Standard text in mail");
had to not use the preset email function becouse i wanted it to only set reciptents in CC and not the to field.
Anyone know what code i can use to implement this feature? im compleatly new to this and would love to get some help
Execute this JavaScript code:
for (var i=0; i<this.numFields; i++) {
var f = this.getField(this.getNthFieldName(i));
if (f==null) continue;
f.readonly = true;
}
Copy link to clipboard
Copied
You can use the mailto syntax to do that... Try this:
mailto:?cc=cc@mail.com&subject=Titel&body=Standard text in mail
The alternative is to perform the validation of the required fields using a script. I've posted code that does that to the forums multiple times in the past. You can search for it...
Copy link to clipboard
Copied
hi, i Cant seem to find ur former post about validating the required fields.. as the first option did not work for me. Ive also gotten another request, When the users press the email button i want to to lock the form and not be editable for the ones who recive it. The people who recieve the email are using foxit reader and adobe reader
Copy link to clipboard
Copied
Using Reader you can't really lock the form fields, unless you use a digital signature field. The best you can do is set them as read only.
I'm not sure what will work and what won't work in Foxit Reader, though.
Copy link to clipboard
Copied
okey. how do i set them as read only? Becouse my problem is that im goin to add a verson of the pdf to my company website, then some users are gonna fill it out and then sendt it out to the persons affected. so what i need is that when the users who fill out the form is pressing my mail button it get sent to the other users in a read only format. if you understand
Copy link to clipboard
Copied
Execute this JavaScript code:
for (var i=0; i<this.numFields; i++) {
var f = this.getField(this.getNthFieldName(i));
if (f==null) continue;
f.readonly = true;
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now