Problem/Motivation

The four questions have been combined into a single field (see: #3015379: Use a single field for all four questions), but all four questions are currently hard-coded in the FAPI to be required regardless of the field's settings.

Proposed resolution

Respect the field's required setting in the FAPI.

Comments

alexdmccabe created an issue. See original summary.

alexdmccabe’s picture

Issue tags: +Needs tests
alexdmccabe’s picture

I think this is functionally complete, but it still needs tests. Just uploading the work I've done so far.

alexdmccabe’s picture

Status: Active » Needs review
StatusFileSize
new5.64 KB
new3.02 KB
ethomas08’s picture

Assigned: Unassigned » ethomas08
ethomas08’s picture

Assigned: ethomas08 » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new52.89 KB
new48.77 KB

The patch applied cleanly. I am attaching before and after screenshots from my manual testing.
After applying the patch, the fields that are not required default to the empty -Select- option.

Each form element now has:
#required' => $required

instead of:
#required' => TRUE

Looks good -- works as intended.

  • alexdmccabe committed 0edd249 on 7.x-2.x
    Issue #3034475 by alexdmccabe, ethomas08: Make the required checkbox...
alexdmccabe’s picture

Status: Reviewed & tested by the community » Fixed
alexdmccabe’s picture

Thanks for reviewing, @ethomas08!

Status: Fixed » Closed (fixed)

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