Unticked 'Allow "other" option?' field doesn't work, fix included
-
Hi There,
I have a site that uses your plugin, and we don’t want to display the additional text field when selecting the ‘other’ option. I thought this may be as simple as just unchecking the box, but turns out it’s not.
The reason behind this is that your code checks for a false value, but that isn’t what is returned by the database. What is actually returned is a ‘no’ value. This means, regardless of whether the box is checked or not, it will always display the field.
The fix:
includes/wchau-functions.php – Line 40Instead of:
if ( wchau_get_option( 'wchau_other', false )) {
Use:
if ( wchau_get_option( 'wchau_other', false ) && wchau_get_option( 'wchau_other', false ) != 'no') {
- The topic ‘Unticked 'Allow "other" option?' field doesn't work, fix included’ is closed to new replies.