Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
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;
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

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

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
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 ?

Please Log in or Create an account to join the conversation.

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

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

Fixed.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.107 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started