I am trying to add a form field to link within the emails section
Use the
formOverrides
property in your plugin config to add a
link
field to your forms. This will allow you to insert links into any of your forms that scroll to the other sections of your form using hash urls. These point to DOM elements on the page with a matching
id
attribute. Something like this:
formBuilder({
formOverrides: {
fields: [
{
name: 'link',
type: 'group',
fields: [
{
name: 'label',
type: 'text',
required: true,
},
{
name: 'url',
type: 'text',
required: true,
},
],
},
],
},
})
@jacobsfletch I dont think I quite worded the question correctly I want the email field to be a link
eg results pdf link url is from a form field
Oh I see. Ok that being rich text, you'd probably need to add a custom leaf that can format the link element you see rendered there. Otherwise you could use your own bracket-like syntax and parse it yourself before sending your emails. Something like this
[Download PDF]({{url}})
(markdown inspired).
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.