on 05-20-2009 3:15 PM
Hello ,
I am new to Adobe forms and Java. We have an existing adobe form built using live cycle designer. It has a section as a drop down ( for note types) under which it shows the different notes attached to a document. We would want to default it to a particular type of note ( as default ). This might be very easy to do, but can someone point me how to proceed?
Hi,
To make any particular value default in a drop down box, select the drop down field in life cycle designer,
you will get its properties in Object palette, under that, select Value tab -> Default drop down, and there you can select the value which you want to make it default.
If you dont find object palette, from the menu bar of life cycle designer->Palette->select "object".
With Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I add the default, will it reflect , which text is shown below?. This is the code for that drop down. How do i add default texttype here.
// If this object exists, then we are not being rendered by the XML Form Agent
if ((Exists(xfa.host.appType)) and ($.bind.ref <> "")) then
// Note the rawValue and try to set the selection if it is present
// As soon as you add items the rawValue will be lost
var CurrValue = ""
// Check for a null - an empty XML node will return a null
if ($.rawValue <> null) then
CurrValue = $.rawValue
endif
var Found = 0
// the data binding may contain "$data.<root data name>" instead of $record
var DataBinding = replace($.bind.ref,Concat("$data.",xfa.record.name),"$record")
DataBinding = replace(DataBinding,"[*]")
if (Exists(xfa.record.enum_list)) then
for i=0 upto xfa.record.enum_list.nodes.length - 1 step 1 do
// Find the match. The binding value may contain "[*]"
// so remove them first
var ListBinding = replace(xfa.record.enum_list.nodes.item(i).binding.value,"[*]")
if (DataBinding == ListBinding) then
// the first two items are the name and binding attributes, then the list starts
if (xfa.host.version < 7) then // add a dummy item to work around a bug in A6
$.addItem("a","-1")
endif
$.clearItems()
for j=2 upto xfa.record.enum_list.nodes.item(i).nodes.length - 1 step 2 do
// The order is assumed to be display and then data
// if the value is null, then add the empty string
if (xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == null) then
$.addItem(xfa.record.enum_list.nodes.item(i).nodes.item(j).value,"")
else
$.addItem(xfa.record.enum_list.nodes.item(i).nodes.item(j).value,xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value)
endif
if (xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == CurrValue) then
Found = 1
endif
if ((xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == null) and (CurrValue == "")) then
Found = 1
endif
endfor
// Now set the selection - omitting this step means there will be no selection
// if there is only one item in the list and no default value, we have to select the first item - Bug in Acrobat 6.02 (fixed in Acrobat 7)
if ((xfa.record.enum_list.nodes.item(i).nodes.length <= 4) and (CurrValue == "") and (xfa.host.version < 7)) then
$.rawValue = xfa.record.enum_list.nodes.item(i).nodes.item(3).value
else
// if available, set the selection to the default value
if (Found) then
$.rawValue = CurrValue
else
// otherwise: set the selection to the first item
$.rawValue = xfa.record.enum_list.nodes.item(i).nodes.item(3).value
endif
endif
// END OF DO NOT MODIFY
// START OF CODE - TO RUN AFTER LIST HAS BEEN FILLED
// END OF CODE - TO RUN AFTER LIST HAS BEEN FILLED
break
endif
endfor
endif
endif
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.