Ask a Question related to Adobe Acrobat Macintosh, Design and Development.
-
Elliott_Steinberg@adobeforums.com #1
Don't want zero dollar value
Hi all,
I set up an invoice form to calculate totals from quantity x unit price. Every line has this formula, however the users may not have a priced item on every line of the form. My total column shows a $0.00 value until I input data. I'd rather have nothing show in that column unless quantity and price are entered. Is that possible?
Thanks!
Elliott
Elliott_Steinberg@adobeforums.com Guest
-
CodeHints and dollar sign ($) problem
Hi for everyone, I?m developing a extension to add CodeHints to the freeDOM.js (it?s a brazilian DOM Library) and I?m having problens when I use... -
Is it best to use Currency or Number for dollar values?
I have been using Currency as the data type of choice for allowing clients to update dollar values (rate, fee, price) into an MS Access database. It... -
Dollar sign not displaying with cfchartlabelformat=currency
Environment: ColdFusion MX 6.1 (6,1,0,83762) on JRun 4 w/ Updater 4 Solaris 9 Sun Java version 1.4.2-b28 (default installed version w/ CFMX and... -
[OT] History of the dollar sign [Was: [OT] Aesthetics of @ and $;]
Alex, Interesting. I have never heard it suggested that the Malatesta "logo" was the inspiration for the dollar sign. Do you have any... -
A free dollar sign shape for ps6?
Hello, I've looked on the net and in the adobe expert center looking for a free dollar sign shape for ps6 and can't find any that work for ps6. ... -
Elliott_Steinberg@adobeforums.com #2
Re: Don't want zero dollar value
Oh, I'm using Acrobat 8.11 on an Intel with OS 10.5.4 (just upgraded yesterday).
Elliott_Steinberg@adobeforums.com Guest
-
George_Johnson@adobeforums.com #3
Re: Don't want zero dollar value
What you need to do is use a custom Format and Keystroke JavaScript for the calculated field. Add the two following functions to a document JavaScript that you create:
function ds_format() {
if (+event.value) {
// $ format for nonzero values
AFNumber_Format(2, 0, 0, 0, "$", true);
} else {
// Don't show anything if result is zero
event.value = "";
}
}
function ds_keystroke() {
AFNumber_Keystroke(2, 0, 0, 0, "$", true);
}
Then, place the following as the field's custom Format and Keystroke scripts, respectively:
// Custom Format script
ds_format();
// Custom Keystroke script
ds_keystroke();
You can now use this for any other fields you want to do this for. Note that the Keystroke script isn't really necessary since you're dealing with a calculated field, which should be set to read-only, but I included it here for completeness in case you want to do this for a data entry field.
George
George_Johnson@adobeforums.com Guest
-
Elliott_Steinberg@adobeforums.com #4
Re: Don't want zero dollar value
many thanks, but the only places I see to put non-canned scripts in "Text Field Properties/Calculate" are 2 boxes called "Simplified Field Notation" and "Custom Calculation Script." Do they all go in the latter one?
Sorry, I'm a newbie at doing forms in Acrobat.
Elliott
Elliott_Steinberg@adobeforums.com Guest
-
George_Johnson@adobeforums.com #5
Re: Don't want zero dollar value
For the document-level scripts, you access them via a menu item. I'm using version 6 on the machine I'm typing on at the moment, and the menu item is "Advanced > JavaScript > Document JavaScripts".
For the field level scripts, select the Format tab of the Field Properties dialog, and select "Custom" from the drop-down list. You should then see where you can enter a Format and Keystroke script.
Be sure to create the document-level script before setting up the Format/Keystroke scripts.
George
George_Johnson@adobeforums.com Guest
-
Elliott_Steinberg@adobeforums.com #6
Re: Don't want zero dollar value
Mine's in "Advanced/Document Processing/Document Javascripts" but that option is greyed out. Any idea what I have to do to activate that?
Elliott_Steinberg@adobeforums.com Guest
-
Elliott_Steinberg@adobeforums.com #7
Re: Don't want zero dollar value
Never mind. It was because I had already put Usage Rights in place. I'll give your script a try. Thanks!
Elliott_Steinberg@adobeforums.com Guest
-
Elliott_Steinberg@adobeforums.com #8
Re: Don't want zero dollar value
Works well. Many thanks!
Elliott
Elliott_Steinberg@adobeforums.com Guest



Reply With Quote

