J
jsniemi79
Guest
Hi Paul. It's been a while since I've looked at 2.2.2 and wasn't doing much script work then, but there are other APIs that are available in the current version to handle this. I don't know if they were there in 2.2.2, but it is worth checking. Instead of using rbf_getFieldValue, there is an api called rbf_isChecked that will return true or false for boolean fields. There is another one called rbf_showOrHideField that will handle the visibility of both the label and input. Something like this would be how I would write it in the current version. If those aren't available, I would try logging the value of your type1 to the console (console.log(type1)
. That will show you the value that is being passed on the rbf_getFieldValue api. It might be passing 0 or 1 instead of true/false. Also, just a tip, but when you compare values against true/false, you should use !== and === instead of != and ==. I hope this helps. Jason
Continue reading...
Continue reading...