3rd set of ANBS controls, Get Set1 here and Set2 here
ANBSOptionWithText to show an option box with text input,
ANBSOptionBoxes to show multiple option buttons in 1 line, and
ANBSCheckbox to show 1 checkbox
Update 2020-12-06: Needed to make it safe for publishing online
Function ANBSOptionBoxes(BName, NoOfBoxes, BCaptionsList,BSelectedID, ReadOnly1_ReadWrite2, LabelColWidth, BLongDescription)
Rett = ""
Rett = Rett & ""
If LabelColWidth > 0 Then
Rett = Rett & "<" & "div class=""form-group row"">" & vbcrlf
Rett = Rett & "<" & "label for=""" & BIDO & """ class=""col-form-label col-md-" & LabelColWidth & """ >"
Rett = Rett & BCaption & "<" & "/label>" & vbcrlf
Rett = Rett & "<" & "div class=""col-md-" & 12 - LabelColWidth & """ >" & vbcrlf
Div2Close = "<" & "/div><" & "/div>" & vbcrlf
End If
ANBSInputBox = Rett
End Function
Function ANBSOptionWithText(BIDO, BNameO, BNameT, BValueO, BValueT, BCaption, BCaptionO, Checked1, ReadOnly1_ReadWrite2, LabelColWidth, BTypeT, BLongDescription)
' BNameO = Name of option control, BNameT = Name of text control
' BTypeO = "password", "Text", ...
Rett = ""
ReadOnly = ""
DescDiv = ""
Checked2 = ""
Div2Close = vbcrlf
If BTypeT = "" Then BTypeT = "text"
If Fix(ReadOnly1_ReadWrite2) = 1 Then ReadOnly = " readonly "
If Checked1 = 1 then Checked2 = " checked "
If BLongDescription > "" Then
DescDiv = DescDiv & "<" & "small class=""form-text text-muted"" >" & vbcrlf
DescDiv = DescDiv & BLongDescription & vbcrlf
DescDiv = DescDiv & "<" & "/small>" & vbcrlf
End If
If LabelColWidth > 0 Then
Rett = Rett & "<" & "div class=""form-group row"">" & vbcrlf
Rett = Rett & "<" & "label for=""" & BIDO & """ class=""col-form-label col-md-" & LabelColWidth & """ >"
Rett = Rett & BCaption & "<" & "/label>" & vbcrlf
Rett = Rett & "<" & "div class=""col-md-" & 12 - LabelColWidth & """ >" & vbcrlf
Div2Close = "<" & "/div><" & "/div>" & vbcrlf
End If
Rett = Rett & ""
Rett = Rett & "<" & "div class=""input-group"">"
Rett = Rett & "<" & "div class=""input-group-prepend"">"
Rett = Rett & "<" & "div class=""input-group-text"">"
Rett = Rett & "<" & "div class=""custom-control custom-radio"">"
Rett = Rett & ""
Rett = Rett & "<" & "input type=""radio"" aria-label=""Radio button for following text input"" "
Rett = Rett & " id=""" & BIDO & """ name=""" & BNameO & """ value=""" & BValueO & """ " & ReadOnly & Checked2
Rett = Rett & "class=""custom-control-input"" > "
Rett = Rett & "<" & "label class=""custom-control-label"" for=""" & BIDO & """>" & BCaptionO & "<" & "/label>"
Rett = Rett & ""
Rett = Rett & "<" & "/div>"
Rett = Rett & "<" & "/div>"
' Rett = Rett & "<" & "span class=""input-group-text"" id=""inputGroup-sizing-sm"">" & BCaptionO & "<" & "/span> "
Rett = Rett & "<" & "/div>"
Rett = Rett & "<" & "input type=""" & BTypeT & """ class=""form-control"" aria-label=""Text input with radio button"" "
Rett = Rett & " id=""" & BNameT & """ name=""" & BNameT & """ value=""" & BValueT & """ " & ReadOnly & " >"
Rett = Rett & "<" & "/div>" & DescDiv & Div2Close
Rett = Rett & ""
Rett = Rett & "" & vbcrlf
Rett = Rett & ""
ANBSOptionWithText = Rett
End Function
Function ANBSCheckbox(BName, BValue, BCaption, ReadOnly1_ReadWrite2, LabelColWidth, BDescription)
Rett = ""
ReadOnly = " "
DescDiv = ""
BChecked = " "
InputStyle = ""
Div2Close = "<" & "/div>" & vbcrlf
If Fix(BValue) = 1 Then BChecked = " checked "
If Fix(ReadOnly1_ReadWrite2) = 1 Then ReadOnly = " disabled "
If BDescription > "" Then
DescDiv = DescDiv & "<" & "small class=""form-text text-muted"" >" & vbcrlf
DescDiv = DescDiv & BDescription & vbcrlf
DescDiv = DescDiv & "<" & "/small>" & vbcrlf
End If
If LabelColWidth > 0 Then
Rett = Rett & "<" & "div class=""form-group row"">" & vbcrlf
Rett = Rett & "<" & "label class=""col-form-label col-md-" & LabelColWidth & """ for=""" & BName & """>"
Rett = Rett & "<" & "/label>"
Rett = Rett & "<" & "div class=""col-md-" & 12 - LabelColWidth & """ >" & vbcrlf
Div2Close = "<" & "/div><" & "/div><" & "/div>" & vbcrlf
End If
Rett = Rett & "<" & "div class=""custom-control custom-checkbox"">"
Rett = Rett & "<" & "input type=""checkbox"" id=""" & BName & """ name=""" & BName & """ "
Rett = Rett & " class=""custom-control-input""" & BChecked & ReadOnly & " >"
Rett = Rett & "<" & "label class=""custom-control-label"" for=""" & BName & """> " & BCaption & "<" & "/label>"
ANBSCheckbox = Rett & DescDiv & Div2Close
End Function
BName, NoOfBoxes, BCaptionsList,BSelectedID, ReadOnly1_ReadWrite2, LabelColWidth, BLongDescription
or
BIDO, BNameO, BNameT, BValueO, BValueT, BCaption, BCaptionO, Checked1, ReadOnly1_ReadWrite2, LabelColWidth, BTypeT, BLongDescription
or
BName, BValue, BCaption, ReadOnly1_ReadWrite2, LabelColWidth, BDescription
or
BIDO, BNameO, BNameT, BValueO, BValueT, BCaption, BCaptionO, Checked1, ReadOnly1_ReadWrite2, LabelColWidth, BTypeT, BLongDescription
or
BName, BValue, BCaption, ReadOnly1_ReadWrite2, LabelColWidth, BDescription
Views 1134 Downloads 331