Replace [ and ] characters in aliases with underscores for nested fields

With a YAML field of `defaultOptions[images]`, `$this->getEventHandler('onRemoveAttachment')` returns *formDefaultOptions[images]::onRemoveAttachment*. This PR fixes the field alias so it uses underscores instead of [ and ].