Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

How do I pass parameters from a blocks to fields?

default discord avatar
dankutalast year
2

I have defined some fields in the fields folder, e.g.

src/fields/buttonOptions.ts

and I import and use them across several blocks, however I would like to be able to configure some options differently specific to the block into which I am importing it (e.g. on the hero block, two buttons can be added, but on some other blocks only one button should be allowed) .



How might I be able to go about something like this?

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.