ProcessWire icon indicating copy to clipboard operation
ProcessWire copied to clipboard

3.0.19: Open when populated + Closed when blank + Locked (not editable), float field set to 0 not showing

Open cb2004 opened this issue 9 years ago • 1 comments

If I have a float field which has the visibility setting in the title, if it is set to 0 which is a valid input for the system I have built, the field is not open and locked, it is closed.

cb2004 avatar May 24 '16 14:05 cb2004

The code behind this (and field dependencies) is written as general purpose for all fields, rather than as having unique rules for each field type. It's in the javascript rather than in PW's PHP code. So if we were to consider 0 is something other than empty in this context, then the code would no longer work for page fields (as an example, among others). So this might be a case where you'd want to avoid using those visibility extras if possible. I'll keep thinking if there are other options though.

ryancramerdesign avatar Jun 09 '16 15:06 ryancramerdesign