Dear Dynamicweb,
We see that the notification subscriber: BeforeCustomFieldValueIsChanged (and BeforeCustomFieldValueIsSet etc.) is not fired for checkboxes.
Please find this code in SetPostValues:
Dim valueChanged As Boolean = value <> Converter.ToString(orderFieldValue.Value) If fieldType.Equals("checkbox", StringComparison.Ordinal) Then valueChanged = Converter.ToBoolean(orderFieldValue.Value) = (value <> "") ElseIf fieldType.Equals("date", StringComparison.Ordinal) OrElse fieldType.Equals("datetime", StringComparison.Ordinal) Then Dim prevVal As Date = Converter.ToDateTime(orderFieldValue.Value) Dim nextVal As Date = Converter.ToDateTime(value) valueChanged = orderFieldValue.Value Is Nothing OrElse Not Date.Equals(prevVal, nextVal) End If
This line: Converter.ToBoolean(orderFieldValue.Value) = (value <> "") gives us a issue, as a "true" in value is not equal to "", then this expression (value <> "") evaluates to "true". But then a previous "false" value in orderFieldValue.Value makes this expression false: Converter.ToBoolean(orderFieldValue.Value) = (value <> ""), but it should be true.
I hope it can be fixed?
Best regards, Anders