Use this.submitForm() to submit emails based on user entry
i'm trying use this.submitform() function able allow users send form instead of built in method due different emails dependent on user entry of text field.
below works—except want pdf sent instead of fdf data. i'm trying function using csubmitas: input parameter, can't seem syntax right...
if(manufacturer.value == "manufacturer a") { this.submitform( "mailto:name@address.com;name2@address.com?&cc=name@address.com;name2@address.com&subject=new service request submittal" ); } else { this.submitform( "mailto:name@address.com;name2@address.com?subject=new service request submittal" ); }
after doing little research, i've come with:
var manufacturer = this.getfield("manufacturer"); var nemail = "mailto:name@address.com;name2@address.com?&cc=name@address.com;name2@address.com&subject=new service request submittal"; var allemail = "mailto:name@address.com;name2@address.com?subject=new service request submittal"; if(manufacturer.value == "manufacturer a") { this.submitform({nemail, csubmitas: "pdf"}); } else { this.submitform({allemail, csubmitas: "pdf"}); }
but seem getting javascript errors no matter try...
it seems needed add parameter "curl:" before variable in array. everything's peachy.
var manufacturer = this.getfield("manufacturer"); var nemail = "mailto:name@address.com;name2@address.com?&cc=name@address.com;name2@address.com&subject=new service request submittal"; var allemail = "mailto:name@address.com;name2@address.com?subject=new service request submittal"; if(manufacturer.value == "manufacturer a") { this.submitform({curl: nemail, csubmitas: "pdf"}); } else { this.submitform({curl; allemail, csubmitas: "pdf"}); }
More discussions in JavaScript
adobe
Comments
Post a Comment