Does anyone know how to specify a default value to populate a dropdown list? We have quite a few forms where "most" of the time one value is correct, but we want to give the docs the option to choose from a defined list of alternatives. I also don't want a "blank" datafield if they forget to choose something.
We just went live on CPS 10 on October 1st, using VFE to edit existing forms.
I've searched everywhere through VFE documentation and can't find any examples, or code to use. Thanks!
Bentley Barbour
Cascade Eye Center
Oregon
we use a variety of techniques to populate fields on a form...
1) a Normal action button...normal values for each field.
2) a Prev action button...previous signed obs term values for each field.
3) a Mine action button...previous signed obs term value from the last update signed by the current user for each field.
4) code in the code window which checks for a blank field and enters a value.
5) code in the code window which checks if a field hasn't had a value entered/cleared and enters a value.
I've seen options 1-3 in forms we received as part of our install, but not 4 & 5. These two sound like exactly what we are looking for. Would you be so kind to share an example of the code I could use for either of these? I've looked all over the documentation for CPS and VFE and haven't found an example. Thank you!
4) {!if DOCUMENT.variable =="" then
DOCUMENT.variable = "value"
endif}
5){!if DOCUMENT.variable == "" then
if DOCUMENT.hidden variable == "" then
DOCUMENT.hidden variable = "value"
DOCUMENT.variable = "value"
endif
endif}