Expand my Community achievements bar.

Display Pattern for Drop Down List with "Allow Custom Text Entry"

Avatar

Former Community Member
I'm creating a form for our Purchasing Dept, where the form records price quotations of up to 5 line items for up to 3 vendors, then calculates and summarizes the totals for each vendor. Vendors sometimes bid on 4 of the 5 items listed, then that one item is considered "No Bid".



I have a field where the user enters the Unit Cost for Vendor x. It is a drop down field with one value "No Bid" added to the list, I've allowed custom text entry, and there is no default value. The user would either select "No Bid" from the drop down or, in most instances, would enter the unit cost. When the user enters a unit cost as a numeric value, how can I get the application to format it into a display pattern as "$Z,ZZZ,ZZ9.99"?



Thanks for your help.
4 Replies

Avatar

Former Community Member
I understand what you're trying to do. Unfortunately, attempting to do this with a drop down list will be quite difficult without some advanced scripting.



In my opinion, I think your case would be better served by using a simpler solution: You could use a numeric field with alternate display patterns.



Place a numeric field on the form. Select it and go to the Field tab in the Object Palette. In the Display Pattern property, enter the following pattern:



num{$Z,ZZZ,ZZ9.99}|null{'No Bid'}


This will have the effect of displaying the text "No Bid" inside the numeric field if no number has been entered into it. When a number is entered, it'll be formatted with the "$Z,ZZZ,ZZ9.99" numeric pattern.



Stefan

Adobe Systems

Avatar

Former Community Member
Stefan...Your suggestion works but creates another problem. If you use the above display pattern and open the form in Reader, all 15 fields will default to show "No Bid." How can I get these 15 fields to be blank when I open the form and show "No Bid" once I exit the field (tab or click)?

Avatar

Former Community Member
I see your point. How about setting the display pattern to



num{$Z,ZZZ,ZZ9.99}


on the numeric fields and then for each numeric field's Exit event, use the following JavaScript:



this.format.picture.value += "|null{'No Bid'}";


This will have the effect of initially-blank numeric fields which display "No Bid" only after the user has tabbed/clicked in and out of them at least once.



Stefan

Adobe Systems