I have a radio box group named "CheckMainbox" with 4 choices named "choice 1" "choice 2" "choice 3" and "choice4".
My proposed code
this.getField("CheckMainbox").value="choice1".display.hidden <----- This is the wrong code but what is the proper syntax to do this?
Cant seem to find anything.
There isnt a simple line of code I can input?
For fields it is easy:
I found this:
Field versus widget attributes
Some properties of the Field object, such as value, apply to all widgets that are children of that field. Other properties, such as rect, are specific to individual widgets.
The following field properties and methods affect field-level attributes:
calcOrderIndex, charLimit, comb, currentValueIndices,defaultValue, doNotScroll, doNotSpellCheck, delay, doc, editable, exportValues, fileSelect, multiline, multipleSelection, name, numItems,page, password,
readonly, required,submitName, type, userName, value, valueAsString, clearItems, browseForFileToSubmit, deleteItemAt, getItemAt, insertItemAt, setAction, setItems,signatureInfo, signatureSign, and signatureValidate.
The following field properties and methods affect widget-level attributes:
alignment, borderStyle, buttonAlignX, buttonAlignY, buttonPosition, buttonScaleHow, buttonScaleWhen, display, fillColor, hidden, highlight, lineWidth, print, rect, strokeColor, style, textColor, textFont, textSize, buttonGetCaption, buttonGetIcon, buttonImportIcon, buttonSetCaption, buttonSetIcon, checkThisBox, defaultIsChecked, isBoxChecked, isDefaultChecked, setAction, and setFocus.
So I would think the following would work for a widget:
// get widget 0 for Radio Button1;
var f = this.getField("Radio Button1.0");
f.hidden = true; // hide widget;