Please Disable Your Browser Adblock Extension for our site and Refresh This Page!

our ads are user friendly, we do not serve popup ads. We serve responsible ads!

Refresh Page
Skip to main content
On . By CodimTh
Category:

How to access webform elements in webform.html.twig in Drupal 8 & 9

 


{#
/**
 * @file
 * Default theme implementation for a webform submission form.
 *
 * Available variables:
 * - form: The webform submission form.
 *
 * @ingroup themeable
 */
#}
{# {{ dump(form) }} #}


<div class="webform">
  <div class="form-wrap clearfix">
      <form{{ form.attributes }}>
        {{ title_prefix }}
        <div class="row">
          <div class="col-md-6">
            {{ form.elements.name }}
            {{ form.elements.email }}
            {{ form.elements.contact_number }}
            {{ form.elements.submission_origin }}
          </div>
          <div class="col-md-6">
            {{ form.elements.actions}}
          </div>
        </div>
          {{ form.form_build_id }}
          {{ form.form_token }}
          {{ form.form_id }}
      </form>
    </div>
  </div>
</div>

Riadh Rahmi

Senior Web Developer (Drupal & Laravel)

I am a senior web developer, I have experience in planning and developing large scale dynamic web applications especially in Drupal and Laravel.

Web Posts

Search

Page Facebook