All i want is to have a checkbox that, when checked, hides a date field in the form.

Here is the issue:
I have a single on/off checkbox. By default it is ON. If I turn it off, I want the date field to appear.

The controlling field setting, once I found it because the documentation on this thing is practically useless, doesn't matter what I say: off or on, my date field is hidden when I load my form. No matter what I set the 'controlling field' value to be within the date field, my date field is hidden on load. Then when I check the box, nothing happens.

I tried to reverse the idea, that the date field is visible, then the checkbox is default OFF. WHen you click the checkbox, the field should be hidden.

When I am in the date field settings, and I change the controlling field settings, it doesn't matter what I choose in whatever combination. My date field is hidden on loading of form.

When I go into my checkbox settings, and the default is set to ON, the checkbox is UNchecked on loading of form. Why?

I would really appreciate:

- Step-by-step instructions on how to view/hide a date field from a single on/off checkbox, then
- Please add that to your documentation/handbook page, so that users don't have to spend an hour trying to figure out something that really shouldn't be that hard to figure out. One example goes a long way to explaining how this module is supposed to work. I don't like having to root around to find the settings for a module. There is nothing in README or Handbook that tells me where the settings forms are or what they do.

Thanks.

Comments

peterpoe’s picture

Category: support » feature

Currently, showing a field when a checkbox is unchecked is unsupported. You can only hide it. The reason is that the "off" value of a single checkbox is never sent to the form. You can read an explanation of this here: #360824: Option to negate trigger values.

About the documentation: actually, there is an usage example in the handbook. It is also clearly stated what are the requisites to make a field controllable. You know that writing documentation is boring. And difficult, if English is not your mother tongue. So this kind of complaining is always less welcome than suggestions for improvements and actual work to make the module better.

Anyway, I updated the handbook page to make it clearer ;)

peterpoe’s picture

Category: feature » support

Oops. Reverting to support request.

ccshannon’s picture

Thank you for doing that. Handbook definitely needed to be clearer. I know that writing docs is boring, but this module is not standard: no menu item, hard-to-understand lingo (and yes, I do know that English is not everyone's first language) -- I appreciate the effort.

And it's good to know that I wasn't crazy in not getting this to work. So, I appreciate the quick response. Thanks, again.

greggmarshall’s picture

I was having the same issue and couldn't find the solution.

The title on this issue doesn't give a clue to what the actual question is, so I have to say I skipped over it several times not realizing it is exactly what I was looking for.

I've just re-read the handbook page again and it really doesn't mention (at least in a way a person not intimately familiar with the module would notice) the limitation that it can't be used with a single checkbox widget field. I've added a comment to the Handbook page to make it clear.

Now to wait for a real solution to the problem...

kobnim’s picture

I spent a long time scratching my head. Where are the "conditional field" settings? How do I say that I want this field to be a triggering field?

And finally I figured out I was looking in the wrong place. The "conditional field" settings show up for fields that can be controlled, not for fields that do the controlling.

For example suppose I want the field "mytrigger" to control the field "height". To set the conditional-field settings, edit the "height" field, not the "mytrigger" field.

Or so it seems ...

mautumn’s picture

Created a new issue about this #866914: Unsupported single on/off checkbox widget field to hopefully better highlight this issue.

peterpoe’s picture

Status: Active » Fixed

Closing old support requests...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.