This may be related to the other date issue (http://drupal.org/node/1218546) but it's effectively the opposite of that one: I've got a pop-up calendar date field that needs to control a text box, so that if there is any value in the date field then the text box is visible. I've got it working just fine when there are two text boxes involved, but it doesn't seem to work when it's a date field that is the dependee. I tried a simple text-field date box as well as the pop-up calendar and neither seem to work.

CommentFileSizeAuthor
#1 issue-1398836.patch1.62 KBmr.york
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mr.york’s picture

Status: Active » Needs review
FileSize
1.62 KB

Simple patch is attached.

Saoirse1916’s picture

Thanks for looking into this -- unfortunately it doesn't seem to have any effect. I applied the patch and cleared my site cache yet the optional field still displays when the dependee date field is empty.

Saoirse1916’s picture

Status: Needs review » Active
arisaves’s picture

+subscribing

blackclover’s picture

Priority: Normal » Major

Conditional Fields April 17 dev version (tried with the above patch and without) same behavior
Date 7.x-2.1
I had a date popup field that was a dependent (required if dependee date popup field was filled). The required form state did not work and the field value would revert to empty after saving the node. Once I removed the dependency it would save with the value in the fields

jdoris’s picture

This one is crufty but it applies to me too. Any news? I have an autocomplete dependent that's set to hide until the popup date field dependee is touched. Dependent is always visible and is not affected by the dependee in any way.

sprucemoose’s picture

I am having the same issue. Any suggestions much appreciated...

Dinis’s picture

Issue summary: View changes

I had the same issue so as a work around used a regular expression to check for no content:

Set the condition to 'value'.
Set Values input mode to 'Regular expression'.

Paste the following regex into the Regular expression field.
^\s*$

Set Interaction with other dependencies to 'And'.
Finally, set Form state under Context settings to 'invisible'.

Note: This essentially a 'NOT' condition as I could not make the regex method work to check when the field had content. This may have been related to the other documented bugs with the date field, but if I find a more elegant solution I'll update this thread.

Hope this helps.

RgnYLDZ’s picture

How can I set a rule like "if the time is between 08:00 and 16:00" show the selection box ?

I have a taxonomy term vocab. as people who work from 08:00 to 16:00 and from 16:00 to 22:00. I added a select field to the terms as "day shift" and night shift. So I can choose who works on day or night.

When adding a content I want to let the user to see the people available as he selects the date time.

When he selects a date after 16:00, I want him to see the selection box with people(terms) with "night shift" field.

dqd’s picture

Priority: Major » Normal
Status: Active » Closed (outdated)

Thanks for the report and all the efforts in here. But due to inactivity in this issue for some years and because of the upcoming EOL of Drupal 7, I will close this issue on the way by cleaning up the issue queue.

Feel free to re-open as "Needs review" if you found a solution or have a patch to be reported to help others on this outdated version.

If you think this issue or missing feature should be addressed in a newer Drupal core 8 and above compatible version of this project, then please file a new issue to the latest dev.