Using renderOptions to modify nested field inputs #2598
Answered
by
engram-design
mikejpeters
asked this question in
Q&A
-
|
I'm passing custom render options that I want to be able to use to customize how my form is rendered: {{ craft.formie.renderPage(form, null, {
fieldNamespace: '',
elementType: 'craft\\elements\\User',
}) }}Event::on(Field::class, Field::EVENT_MODIFY_HTML_TAG, function (ModifyFieldHtmlTagEvent $e) {
if ($e->key === 'fieldInput')) {
// $e->context['renderOptions']['elementType'] is undefined when rendering nested field inputs,
// e.g. first & last name inputs of a Name field
}
});Is there a different approach to do this for nested field inputs? |
Beta Was this translation helpful? Give feedback.
Answered by
engram-design
Oct 22, 2025
Replies: 1 comment
-
|
I assume you're on Formie 3? Fixed for the next release. To get this early, run |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mikejpeters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I assume you're on Formie 3? Fixed for the next release. To get this early, run
composer require verbb/formie:"dev-craft-5 as 3.1.4".