13.11.2025 | Lothar Ferreira Neumann

How to place HTML elements into webforms via the Source tab

You can add headlines to a webform using the code below. To get to the source section, navigate to the form you want to alter, click on build and then on the source tab like in the screenshot.

Screenshot of the menu to add code to webform

This is just a short example on how to add a headline.

webform_headline.yml
personal_data:
  '#type': html_tag
  '#tag': h3
  '#value': 'Personal data'

It will look something like this:

Headline within a webform

Issue:

You want to insert headings or other text elements into a web form, e.g. to subdivide it for better readability and/or understandability.

Solution:

Use a structured data format to define HTML elements that add the headline "Personal Data" to a web form.

Weitere DevBits

15.01.2026 | Lothar Ferreira Neumann

How to migrate latitude & longitude geodata into a unified geocode field

geofield_migration.yml
field_geofield:
  plugin: geofield_latlon
  source:
    - field_latitude
    - field_longitude
yml
geodata
Migration
21.05.2026 | Lothar Ferreira Neumann

Aggregate heterogeneous media fields for structured Drupal migration

migration_field_merge.yml
  field_media:
    - plugin: merge
      source:
        - field_image
        - field_images
    - plugin: sub_process
      process:
        target_id:
          - plugin: migration_lookup
            source: fid
            migration:
              - my_migration_media_image
yml
Migration
media