I have a use case where I need to prevent admins from configuring the File component to receive additional extensions. In my form alter, I have:

$form['validation']['extensions']['addextensions']['#access'] = FALSE;

However, I still see the field label when the element is rendered.

Can we please check the access of this element before rendering it?

Comments

joelstein created an issue. See original summary.

joelstein’s picture

Status: Active » Needs review
StatusFileSize
new964 bytes

  • DanChadwick committed 52c4fc7 on 7.x-4.x
    Issue #2688621 by joelstein: Added hide additional extensions field on...
danchadwick’s picture

Status: Needs review » Fixed
StatusFileSize
new1.33 KB

This seems like a very good idea. Simplified the boolean expression a touch.

Committed to 7.x-4.x.

danchadwick’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Category: Bug report » Task
Status: Fixed » Patch (to be ported)
joelstein’s picture

Great, thanks for committing this!

fenstrat’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev
Category: Task » Bug report
Status: Patch (to be ported) » Fixed

Closing to clear out the old Webform 8.x-4.x branch. See #2827845: [roadmap] YAML Form 8.x-1.x to Webform 8.x-5.x.

  • DanChadwick committed 52c4fc7 on 8.x-5.x
    Issue #2688621 by joelstein: Added hide additional extensions field on...

Status: Fixed » Closed (fixed)

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