Copy link to clipboard
Copied
Hi. I've searched through and not found my exact issue. Some are close.
I have what will be a "complicated" form (at least for me). Here's what I need to do:
* Have a "cost calculation" section where staff calculate the costs associated with their travel (hotel, meals, transportation, etc.). These are all calculated fields (number of nights X cost of hotel, etc.) This step, I'm fine with.
* Summarize that data into the several lines that will grab data from the caclulations above. (For instance, the meals section will add together the # of breakfasts X the cost of breakfast PLUS the # of dinners X the cost of dinner.) This step I'm fine with.
* Then, I need another bureau to be able to COPY that summary (Lodging/Meals/Transportation/Total) out of Adobe into an application they work with. This is where I am having trouble.
When I copy the summary out, I only get the words, not the data that has been entered. The data has to be pulled field by field.
Below is a SIMPLE mock-up for the purposes of seeing what I'm seeing. If the fields are completed as follows (the dollar amounts are calculated):
Meals: $100
Lodging: $280
Transportation: $200
Total: $580
Now, if I do a copy/paste, all that shows up is:
Meals:
Lodging:
Transportation:
Total:
If I need the dollar amounts, those have to be individually copies...
Is there a way to create a summary that can be copied as ONE grab?
Copy link to clipboard
Copied
At calculation of the text field you can use this:
event.value = "Lodging Total " + this.getField("LodgingTotal").value + "\nMeals Total " + this.getField("MealsTotal").value + ...
Copy link to clipboard
Copied
Use a multi-line text field.
Copy link to clipboard
Copied
In Adobe Acrobat you can flattern the form fields.
Copy link to clipboard
Copied
Bernd, thank you for responding so quickly. So, I have never used flatten form fields before, but in what I just looked at, it seems that only works with Acrobat. Most of our users will be using Reader to complete and send and receive our form.
Any other thoughts?
Copy link to clipboard
Copied
With a script put labels and data in a multi-line form text field.
Copy link to clipboard
Copied
That could be beyond me. I've done a tiny bit in Java, but can't seem to make this work.
So, can you assist with a simple example and then I should be able to tweak it to make it work for me.
Form Fields are as follows:
1) LodgingTotal
2) MealsTotal
The values of these two fields are all calculated numeric field. We'll say $100, $50 respectively.
I would like the output (what is able to be copied out of Adobe and pasted into a separate database) to be:
Lodging Total $100
Meals Total $50
Total $150
How do I create the script for this?
Copy link to clipboard
Copied
At calculation of the text field you can use this:
event.value = "Lodging Total " + this.getField("LodgingTotal").value + "\nMeals Total " + this.getField("MealsTotal").value + ...
Copy link to clipboard
Copied
Oh, my gosh!!!! I think that will work! I will play with it and see what I can come up with. This is fantastic!!! Thank you!
Copy link to clipboard
Copied
So, I can't get the \n to work to create a new line. Is there a trick? I'm using Acrobat Pro, on a Windows 10 Enterprise computer, if that makes a difference.
So, the results are coming out
Lodging Total 210 Meals Total 120
Rather than
Lodging Total 210
Meals Total 120
Copy link to clipboard
Copied
Use a multi-line text field.
Copy link to clipboard
Copied
Thank you. Now I feel stupid! I had it set as that, but have deleleted the field a couple of times to fix another issue (the fact that I needed to change the field calculation order), and lost the multi-line....
Thank you, AGAIN!