Check Box: Reference Information
In the tables of this topic, you can find reference information about check boxes.
Conversion from ASPX to HTML and TypeScript
The following tables will help you to convert the ASPX elements that are related to check boxes to HTML or TypeScript elements.
ASPX | HTML or TypeScript |
---|---|
PXCheckBox
|
Replace with field (whose control type is automatically defined as a check box from the backend code). In rare cases, you should replace it explicitly with the qp-check-box control. |
AlignLeft
|
Use the textAlign property of the config attribute of the qp-check-box control. The property specifies whether the text of the check box should be aligned right or left. The following values are available: right and left.
|
CommitChanges
|
Use PXFieldOptions.CommitChanges in TypeScript
code.
|
DataField
|
Use the name attribute of the field tag.
|
FalseValue
|
Use the falseValue property of the config attribute of the qp-check-box control. The property specifies the string that is used as the field value when the check box is cleared.
|
ID
|
Replace with the id attribute of the qp-field tag if this tag is used as a replacement. In other cases, the ID is not necessary for a check box. |
RenderStyle
|
Use the falseValue property of the config
attribute of the qp-check-box control. The property specifies how
the check box is rendered. If you need to render the check box as a button, set the
property to
button .
|
TrueValue
|
Use the trueValue property of the config attribute of the qp-check-box control. The property specifies the string that is used as the field value when the check box is selected.
|
SuppressLabel
|
Use class="no-label" for the field tag.
(You do not need to use class="no-label" with
qp-field , which does not have a label by
default.)
|
ASPX | HTML or TypeScript |
---|---|
CheckImages
|
Use the checkImages property of the config
attribute of the qp-check-box control. The property specifies
the image that should be used for the selected state of the check box if this
check box is rendered as a button (see
|
ASPX | HTML or TypeScript |
---|---|
UncheckImages
|
Use the uncheckImages property of the
config attribute of the qp-check-box
control. The property specifies the image that should be used for the selected
state of the check box if this check box is rendered as a button (see
|
ASPX Control | Property |
---|---|
PXCheckBox | runat |
qp-check-box
The following table lists the properties that are available in the config attribute of the qp-check-box control, which represents a check box in HTML.
Property | Description |
---|---|
checkImages |
Specifies the image that should be used for the selected state of the check box
if this check box is rendered as a button (see
|
falseValue |
Specifies the string that is used as the field value when the check box is cleared.
|
label | Specifies the label of a check box. Generally, you do not need to use this property because the label is defined by the DisplayName property of the PXUIField attribute of the data access class (DAC) field. |
renderStyle | Specifies how the check box is rendered. If you need to render the check box as
a button, set the property to
button .
|
textAlign |
Specifies whether the text of the check box should be aligned right or left. The following values are available: right and left.
|
trueValue |
Specifies the string that is used as the field value when the check box is selected.
|
uncheckImages |
Specifies the image that should be used for the selected state of the check box
if this check box is rendered as a button (see
|