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.056 seconds

Hi first of all I'd like to say that J-Cook is a great tool - the best component builder I tried so far...
Rymedia - Jonas 

Get Started