K
K
Kirill2020-09-16 22:07:13
Drupal
Kirill, 2020-09-16 22:07:13

How to output fields from TWIG template commerce-checkout-form?

Plz tell me how to display the required form fields separately and not the entire form.
I copied the template commerce-checkout-form--with-sidebar.html.twig into my theme
, the whole form (all fields) is displayed:
{{ form|without('sidebar', 'actions') }}
I need to display the fields separately, can anyone know how?
looking with devel {{ dd(form) }}
form => order_fields:checkout => field_phone
how to write in the template?
poke method does not work :(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andead, 2020-09-16
@KirillSPB777

{{ form['order_fields:checkout']['field_phone'] }}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question