Check Box: 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.
PXCheckBox
The following table shows the correspondence between the PXCheckBox ASPX element and the HTML or TypeScript elements. During the conversion of ASPX pages to HTML and TypeScript, you need to replace these ASPX elements with their analogs in HTML or TypeScript.
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.)
|
CheckImages
The following table shows the correspondence between the CheckImages ASPX element and the HTML or TypeScript elements. During the conversion of ASPX pages to HTML and TypeScript, you need to replace these ASPX elements with their analogs in HTML or TypeScript.
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
|
UncheckImages
The following table shows the correspondence between the UncheckImages ASPX element and the HTML or TypeScript elements. During the conversion of ASPX pages to HTML and TypeScript, you need to replace these ASPX elements with their analogs in HTML or TypeScript.
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
|
Obsolete ASPX Control and Property
The following table lists the obsolete ASPX element that is related to check boxes. You do not need to replace this ASPX element with any HTML or TypeScript elements.
ASPX Control | Property |
---|---|
PXCheckBox | runat |