New-UDInputField Checkbox not allowing a check

I am running UD v 2.9.0. I have created a new-udinput and have a field for checkboxes that looks like the following:

foreach ($item in $HostingPlatformSQL) {
$HPName = $item.HostingPlatform
#$HPName = $HPName.Replace(" ", “”)
If ($HostingPlatformArray -contains $item.HostingPlatform) {
Write-UDLog “----------------InputField $HPName default value”
New-UDInputField -Type ‘checkbox’ -Name $item.HostingPlatformPKID -Placeholder “$HPName” -DefaultValue $true
} else {
Write-UDLog “----------------InputField $HPName”
New-UDInputField -Type ‘checkbox’ -Name $item.HostingPlatformPKID -Placeholder “$HPName”

It creates the various checkboxes (a total of 5). The first three, I can reliably check or uncheck, but for some reason I am having issues with the last two checkboxes. Sometimes, I can check the last one, but most times I can’t check either of them. It seems strange since they are all using the same code. I am doing this in a modal, so don’t know if that might be an issue with this either.

Any suggestions on what to look at?