#Hide Email Options Form Builder

6 messages · Page 1 of 1 (latest)

gray bridge
#

I'm planning to use the form builder plugin to build simple forms. However, since Emails are not relevant, I'd like to hide it from the admin panel.

I've tried supplying an "emails" field in the formOverrides with a condition function that returns false, but all it does is create a second emails field (and hide it)

hardy geyser
graceful wave
#

@gray bridge Did you ever find a workaround for this?

hardy geyser
#

@gray bridge, @graceful wave, @unique mason in the 3.0 beta of this plugin we changed the field overrides to be a function instead of an array of fields. That way you can modify the default fields in any way. This pattern gives you complete control over the schemas that the plugin injects, i.e. the email field conditions. Here's the PR from @restive belfry https://github.com/payloadcms/payload/pull/6497

GitHub

Description
Changes the fields override for form builder plugin to use a function instead so that we can actually override existing fields which currently will not work.
//before
fields: [
{
...

restive belfry
#

You mean @bold chasm