Access entry variables from a template override #2055
-
In the context of a body builder matrix, we typically allow for changing the background colour of each section. When changing the background colour of a Formie block/entry type, how can I access the selected background colour (a Craft dropdown field) from within a Formie template override? Any other way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Ah nevermind I think I figured out a solution - I can pass arbitrary variables/objects via the |
Beta Was this translation helpful? Give feedback.
-
You can pass in any cariable you like as {% set renderOptions = {
myVariable: 'some-value',
} %}
{{ craft.formie.renderForm('contactForm', renderOptions) }} Which are available in any Formie template as |
Beta Was this translation helpful? Give feedback.
You can pass in any cariable you like as
renderOptions
.Which are available in any Formie template as
renderOptions.myVariable
.