Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Boolean in grid not displaying correctly.

Boolean Radios not displaying correctly. 22 Jun 2013 13:18 #7610

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 415
  • Thank you received: 132
  • Karma: 47
Just checked the default vales set for my bool fields
default value for false = NULL
default value for true = 1

shouldn't undefined be NULL and false be 0

in the item model under
// prime some default values

$data->true_fieldname = 1;
$data->false_fieldname = null;
Last Edit: 22 Jun 2013 13:21 by BTB300.
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Boolean Radios not displaying correctly. 22 Jun 2013 14:21 #7613

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 415
  • Thank you received: 132
  • Karma: 47
Checked the data base install file

default values are set correctly

False=0
True=1

ALSO noticed that
- If the bool field is set to prefill = false
- if you do not select the radio button before saving
- the field is saved as null (because the prime fields value for false is incorrect)

THIS ALSO causes issues with toggle value in list views

Because the field is null you can not toggle the bool field in list views

If you change the field value from null to 1 or 0 in the database the field you can now toggle the field in list views

The icon for null value is a red circle with a cross
Should this no be grey perhaps ?
The administrator has disabled public write access.

Boolean Radios not displaying correctly. 27 Aug 2013 09:09 #10916

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Thanks again for your eagle eye.
K+

Fixed.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.059 seconds

Get Started