how to render only some fields and UI elements on template #9693
-
Hi.
after Craft 3.5 and custom UI enhancement, this KB says we can render custom fields and UI elements with this lines:
and passing $fieldHtml to twig. but it render all custom fields and UI elements. i know second argument of createForm() ,pass static status, but now I am wondering how can i pass only selected custom fields and UI elements to twig? is it related to third argument of createForm()? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You could technically still render your filtered list of fields the old way; you just wouldn’t get any UI elements (Template, If you want to use the field layout’s |
Beta Was this translation helpful? Give feedback.
You could technically still render your filtered list of fields the old way; you just wouldn’t get any UI elements (Template,
<hr>
, etc.) defined for the field layout.If you want to use the field layout’s
render()
method, it’s all-or-nothing.