Hello,
I have an interesting situation, I have an interactive spreadsheet that has a clickbutton that will open outlook to email the form. It also creates a subject line to email based on fields in the pdf, I used the following code for that:
<script contentType="application/x-javascript">//Create a variable to hold the document object
var oDoc = event.target;
oDoc.mailDoc({
bUI: true,
cTo: "a@b.com",
cSubject: Employee_Name.rawValue + ", " + Service_Area.rawValue + " ," + Employee_Number.rawValue + " ," + Dropdown1.rawValue
});
</script>
Views
Replies
Total Likes
Hi,
Are you sure that that will be CheckBox? As we can check more than one choice. But in the subject line you are using one variable i.e. "D".
However, if you want to check only one CheckBox and that's to be added do the subject line. Then try the following.
Create a hidden textfield. Say Hidden_Field. In the click or change event of the checkbox you have to write a bit of script so that it stores the choice in the hidden field and you can add the rawValue of the hidden field in the subject line.
In the Change or Click event of CheckBox .
If (this.rawValue == 1)
{
Hidden_Field.rawValue = "A";
}
else
{
Hidden_Field.rawValue = null;
}
Now replace the D in the subject line with Hidden_Field.rawValue ;
Thanks,
Bibhu.
Views
Replies
Total Likes
Hi,
I tried creating a hidden text field in Acrobat Pro to feed a set of text based on which checkbox is clicked with the following example code:
(function () {
// Get a reference to the text field
var f = getField("bufferField");
// Set the value of the text field
if (event.target.value !== "Off") {
f.value = "ABC"
} else {
f.value = "";
}
})();
The issue is that I need to use livecycle to add the function I listed above to email it out with the subject feeding from the fields but once I import it into Livecycle the buffer field no longer works, it does not feed from the checkbox input anymore. Any reason why?
Views
Replies
Total Likes
Hi,
I am a bit confused about the tool you are using to develop the form. Is it LiveCycle or Acrobat. LiveCycle's JavaScript is bit different than that of Acrobat's.
You can try the following script in LiveCycle in the check or click event of the check box.
var f = checkbox field name.rawValue ; // Stores the value of the check box, 1 = On, 0 = Off.
if (f == 0)
{
bufferField.rawValue = "ABC";
}
else
{
bufferField.rawValue = "";
}
Thanks,
Bibhu.
Views
Replies
Total Likes