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

Real time saver and great Component Builder tool ! I have been developing with J-Cook Pro Component Builder for several months now and can say with all honesty that this product/service is second to none. The product is feature rich and is being improved and added to all the time. Do yourself a favor if you need to build a Joomla! Component then you can do no wrong in trying the product. You will save on time and effort while being able to deliver your project on time. J-Cook pro does the hard work for you you then have the freedom to fully customise the end result for your own needs. 

One word: Awesome.
Edwardcox (JED)
         

Get Started