Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I'm using a Select (or other) with Conditional Field (Conditional Fields module). When the field is required and hidden, I need to enter a value in order to save the page. I can't make the field required...
With anoter cck field widget, I don't have this problem.
Comments
Comment #1
Junro CreditAttribution: Junro commentedComment #2
haydeniv CreditAttribution: haydeniv commentedIs this a problem with the Drupal 7 version of this module? I'm not actively supporting Drupal 6. If you need this for Drupal 6 patches are welcome.
Comment #3
legolasboComment #4
vivekguptakota CreditAttribution: vivekguptakota commentedIn D7, I am also facing same issue.
Comment #5
legolasbo@vivekguptakota,
If this is an issue for you please re-open the issue and provide clear steps to reproduce on a vanilla Drupal installation.
Comment #6
jay-dee-ess CreditAttribution: jay-dee-ess as a volunteer commentedWorking w/ Webform 7.x-4.12
Steps to reproduce:
Error:
Required Select Other (specify) field is required.
Note:
In the above scenario, if "Show Required Select" is "Off" and "Required Select" has a non-Other option checked, the form submits fine.
Comment #7
albertski CreditAttribution: albertski at Xeno Media, Inc. commentedI'm having the same issue as well. Same thing as #6. If I don't use conditionals I don't run into any problems but if I do I get the issues.
The form error is coming from the webform_module in _webform_client_form_validate() on this statement:
Noting that the select_or_other field is required. I'm assuming somehow during the conditionals it converts it to required.
Comment #8
capysara CreditAttribution: capysara commentedI’m not sure if this is the same as (or just similar to). I’m using a regular node instead of Webform (I also tried it with an Entityform with the same results). If I make the select (or other) field conditionally required, then it throws an error even when something is selected.
Steps to reproduce:
drupal 7.59
download & enable these two modules
1. select_or_other-7.x-3.0-alpha2
2. field_conditional_state-7.x-1.1 (note: this is an older version. The newest version, 2.1, does not support the widget at all)
Manage fields - basic page
Add new list (integer) field with values (‘list’):
0|yes
1|no
Add new text field w/ Select (or other) list widget (‘other list’)
Default settings, except add Additional options:
1|1
2|2
3|3
Conditional State: “Field other list is required when field List has value yes”
Add content: /node/add/page
List: select yes
other list: select 1
Error message: ‘other list field is required.’
Thanks so much!
Comment #9
daften CreditAttribution: daften at Dropsolid commentedClosing as outdated because no activity in a long time and Drupal 7 goes EOL soon. Feel free to re-open if needed.