Documentation

Media Fields for Contact Form 7

Five media field types for Contact Form 7 — video, audio, 3D models, image galleries and page-turning PDFs. This is the complete guide: install it, build each field, set your defaults, and extend it.

1. Getting started

This guide takes you from an empty site to a working video field inside a form. It takes about five minutes.

1.1 Install the plugin

In your WordPress admin go to Plugins → Add New and search for Media Fields for Contact Form 7. Click Install Now, then Activate.

Searching for the plugin in Plugins → Add New

If Contact Form 7 is not installed yet, WordPress asks you to install it first — the plugin needs it to work.

You can also upload the zip from the plugin page: Plugins → Add New → Upload Plugin.

1.2 Activate it

After activation the plugin appears in your plugin list with three links: Settings, Opt In and Deactivate.

The plugin row on the Plugins screen

1.3 The one-time opt-in

The first time you open the plugin you are asked, once, whether you would like to share some non-sensitive data about your site: the WordPress and PHP versions, the active plugins, and which of the media fields you use. It helps us decide which fields to build next.

The opt-in screen shown once after activation

  • Allow & Continue — share the data.
  • Skip — share nothing. The plugin works exactly the same.

Nothing is sent unless you allow it, and you can change your mind at any time from the Opt In / Opt Out link on the Plugins screen.

1.4 The dashboard

After that you land on the plugin's dashboard: Contact → Media Fields.

The Media Fields dashboard

The dashboard has:

  • Watch and learn — two short videos, a step-by-step tutorial and a two-minute introduction. Nothing is requested from YouTube until you press play. Hide videos collapses the panel and remembers your choice.
  • Overview — a card for each field type with an on/off switch and a Configure button.
  • The left menu — one page of defaults per field type, plus General and a Tag reference with copy-and-paste examples.

You do not need to change anything here to start. The defaults are sensible. Come back when you want to set a brand colour or a default layout for every form at once — see Settings.

1.5 Build your first field

Open a form: Contact → Contact Forms, then click a form or Add New.

The form editor with the media tag buttons

Above the form editor is a row of tag buttons. The last five are the media fields: video, audio, 3D model, gallery and PDF.

The five media field buttons

Click video. A tag generator opens.

The video tag generator

  1. Field name — type a short name, for example intro.
  2. Media source — paste a video URL. This can be a file on your site, a YouTube link or a Vimeo link. Add from Media Library picks a file you have already uploaded.
  3. Title — optional. Used for accessibility and shown on the lock screen on phones.
  4. The sections below (Layout, Playback, Controls, and so on) are optional. Open any of them to change how the player looks or behaves. Only the options you change are written into the tag.
  5. Click Insert Tag.

The tag appears in your form where the cursor was:

[video intro "https://example.com/intro.mp4"]

Put it wherever you want the player to appear — above the fields, between them, next to the submit button. Save the form.

1.6 Put the form on a page

Every Contact Form 7 form has a shortcode. It is at the top of the form editor:

The form's shortcode

Copy it and paste it into any page or post. In the block editor use a Shortcode block or the Contact Form 7 block.

Open the page. The video plays inside the form:

A video field on the front end

1.7 What next

Nothing is sent with the email. Media fields display content; they do not collect anything. That is why they do not appear in the Mail tab and why the generator says "This tag has no user input, so there is no mail-tag for it."

2. Video field

Plays a video inside the form. Works with files on your own site (MP4, WebM, Ogg), YouTube and Vimeo. The player is Plyr, a lightweight, accessible player, and every Plyr option is available as a tag option.

A video field on the front end

2.1 Quick start with the generator

In the form editor click video.

The video tag generator

  • Field name — required, for example tour.
  • Provider — leave on Self-hosted for a file, or pick YouTube / Vimeo. The plugin also detects YouTube and Vimeo links automatically, so you can usually leave this alone.
  • Media URL(s) — one URL per line. For self-hosted video you can add several files (for example MP4 and WebM) and the browser picks the one it supports.
  • Title — optional.

Everything else is optional. Click Insert Tag.

2.2 Examples

A file on your site:

[video intro "https://example.com/intro.mp4"]

A YouTube video, privacy-enhanced (no cookies until play):

[video promo yt-nocookie "https://www.youtube.com/watch?v=bTqVqk7FSmY"]

A Vimeo video that starts muted and loops, using just the video ID:

[video promo provider:vimeo autoplay muted loop "76979871"]

A 16:9 player with a poster image, a brand colour and a title:

[video tour poster:https://example.com/poster.jpg ratio:16:9 color:#146EF5 "https://example.com/tour.mp4"] Inside the studio [/video]

Quality switching — one file per quality with a size hint after a pipe:

[video intro quality:720 "https://example.com/intro-1080.mp4|1080" "https://example.com/intro-720.mp4|720"]

2.3 Rules worth knowing

  • URLs go last and in double quotes.
  • Option values cannot contain spaces. Use _ for a space in text (artist:Jane_Doe) and | to separate list items.
  • Autoplay only works when the video is also muted. That is a browser rule, not a plugin one.
  • A bare word is a flag: autoplay, muted, loop. A no- flag turns something off even if the settings page turns it on: no-fullscreen.

2.4 All options

Source

Option Values What it does
provider: html5, youtube, vimeo Forces the player type. Usually not needed — the URL is detected.

Layout and appearance

Option Values What it does
ratio: 16:9, 4:3, 1:1, 21:9, 9:16 Shape of the player. Empty = taken from the video.
width: 50–4000 Maximum width in pixels. Empty = full width of the form.
align: center, right Alignment. Empty = left.
color: hex, e.g. #00b3ff Accent colour for the controls.
poster: image URL Picture shown before play.

Playback

Option Values What it does
autoplay flag Start automatically. Needs muted.
muted flag Start muted.
loop flag Repeat when finished.
reset-on-end flag Rewind to the start when finished.
no-playsinline flag On iPhones, open the native full-screen player instead of playing inline.
no-autopause flag Let several Vimeo players play at once.
volume: 0–1 Starting volume, e.g. 0.5.
seek-time: 1–600 Seconds jumped by rewind / fast-forward.
duration: number Override the displayed length. Rarely needed.

Controls and settings menu

Option Values What it does
controls: list separated by | Which buttons to show. Available: play-large, restart, rewind, play, fast-forward, progress, current-time, duration, mute, volume, captions, settings, pip, airplay, download, fullscreen.
settings: list of captions, quality, speed, loop What the gear menu offers.
download: URL File served by the Download button. Empty = the video itself.

Example — a minimal player with only play, progress and fullscreen:

[video clip controls:play|progress|fullscreen "https://example.com/clip.mp4"]

Interface behaviour

Option What it does
no-click-to-play Clicking the picture no longer plays/pauses.
no-hide-controls Keep the controls visible all the time.
context-menu Allow the right-click menu.
no-display-duration Hide the length before play.
no-invert-time Show time elapsed instead of time remaining.
no-toggle-invert Clicking the time no longer switches the format.
tooltips-controls Show tooltips on the buttons.
no-tooltips-seek Hide the tooltip on the progress bar.
no-keyboard Disable keyboard shortcuts.
keyboard-global Shortcuts work even when the player is not focused.
no-fullscreen Disable fullscreen.
no-fullscreen-fallback No "full window" fallback on browsers without fullscreen.
fullscreen-ios-native Use the native iOS fullscreen player.
fullscreen-container: CSS selector of the element to make fullscreen instead of the player.
no-storage Do not remember the visitor's volume, captions and speed.
storage-key: Name used to remember them (default plyr).

Captions

Captions work with WebVTT (.vtt) files for self-hosted video. For YouTube they set the caption preference of the embedded player.

Option Values What it does
captions: language|URL|Label items separated by spaces Caption tracks. Label is optional.
captions-active flag Show captions by default.
captions-lang: en, fr, … Default caption language. Empty = the visitor's browser language.
captions-update flag Watch for tracks added later.
[video talk captions:en|https://example.com/en.vtt|English fr|https://example.com/fr.vtt|Français captions-active "https://example.com/talk.mp4"]

If the caption file lives on another domain add the crossorigin flag.

Speed and quality

Option Values What it does
speed: 0.1–16 Default speed, e.g. 1.25.
speed-options: list, e.g. 0.5|1|1.5|2 Speeds offered in the menu.
quality: height in px, e.g. 720 Quality selected on load.
quality-options: list, e.g. 1080|720|480 Heights offered in the menu.
quality-forced flag Show the quality menu even if switching is not possible.

Quality switching for your own files needs one source per quality with a size hint: "video-720.mp4|720".

Lock-screen information (phones)

Option What it does
artist: Artist name. Use _ for spaces.
album: Album name.
artwork: Image URL.

Chapters and preview thumbnails

Option Values What it does
markers: seconds=Label items separated by | Chapter markers on the progress bar, e.g. markers:0=Intro|45=Pricing|120=Questions.
thumbnails: URL of a WebVTT sprite file Preview pictures while scrubbing.
thumbnails-credentials flag Send cookies when loading the thumbnail file.

YouTube

Option What it does
yt-nocookie Use youtube-nocookie.com (privacy-enhanced).
yt-rel Show related videos at the end.
yt-annotations Show annotations.
yt-native-controls Use YouTube's own controls instead of Plyr's.
yt-start: Start at this second.
yt-end: Stop at this second.
yt-hl: Interface language, e.g. de.

Vimeo

Option What it does
vimeo-byline Show the byline.
vimeo-portrait Show the author picture.
vimeo-title Show the title.
no-vimeo-speed Disable speed controls.
vimeo-transparent Transparent background.
vimeo-native-controls Use Vimeo's own controls.
vimeo-premium You have a Vimeo Pro/Business account (lets native controls be hidden).
vimeo-referrer-policy: One of the standard referrer policies, e.g. strict-origin-when-cross-origin.

Advanced

Option What it does
crossorigin Load the media with CORS. Needed for caption files on another domain.
debug Log player activity to the browser console.
disabled Turn Plyr off and show the browser's plain player.
ads-publisher-id: vi.ai advertising publisher ID.
ads-tag-url: VAST ad tag URL (Google IMA).
id: / class: Standard Contact Form 7 options, added to the wrapper.

2.5 Site-wide defaults

The accent colour, the default control set, the settings menu, "remember visitor preferences" and "auto-hide controls" can be set once for every video in Contact → Media Fields → Video. A tag option always wins over the default. See Settings.

3. Audio field

Plays an audio file inside the form: MP3, M4A, AAC, OGG, WAV or FLAC. Good for a podcast episode above a question form, a voice message on a booking form, or a sample track on an order form.

An audio field above the form questions

3.1 Quick start with the generator

In the form editor click audio.

The audio tag generator

  • Field name — required, for example episode.
  • Media URL(s) — one URL per line. Add several formats if you have them; the browser picks one it can play. Add from Media Library picks an uploaded file.
  • Title — optional. Shown on the lock screen on phones.

Click Insert Tag.

3.2 Examples

[audio episode "https://example.com/episode-4.mp3"]

With a title, artist name and brand colour:

[audio brief artist:Nocturne_Studio color:#FF7A00 "https://example.com/brief.mp3"] Episode 4 — Colour in the dark [/audio]

Two formats, so every browser can play it:

[audio jingle "https://example.com/jingle.mp3" "https://example.com/jingle.ogg"]

3.3 Options

The audio field uses the same player as the video field, so every option in Video → All options also works here. The ones that matter most for audio:

Option What it does
color: Accent colour.
width: / align: Size and alignment of the player.
autoplay, muted, loop Playback flags. Autoplay needs muted.
volume: Starting volume, 0–1.
controls: Which buttons to show: restart, rewind, play, fast-forward, progress, current-time, duration, mute, volume, settings, download.
settings: Gear menu items: speed, loop.
speed: / speed-options: Playback speed and the speeds offered.
artist:, album:, artwork: Lock-screen information on phones. Use _ for spaces.
download: File served by the Download button.
no-storage Do not remember the visitor's volume and speed.

Options that only make sense for pictures — ratio:, poster:, captions, fullscreen, picture-in-picture, YouTube and Vimeo options — are ignored.

3.4 Site-wide defaults

Contact → Media Fields → Audio sets the accent colour, the default controls, the settings menu and the behaviour switches for every audio player at once. See Settings.

4. 3D model field

Shows an interactive 3D model inside the form. Visitors drag to spin it, scroll to zoom, and on a phone can place it in their own room with augmented reality. Useful for product enquiries, made-to-order items and anything people want to inspect before they ask.

The viewer is Google's <model-viewer>, and every one of its options is available.

A 3D model with hotspots inside a product enquiry form

4.1 What you need

  • A model in glTF or GLB format (.glb is a single file and the easiest to work with).
  • Optionally a USDZ file of the same model for augmented reality on iPhones and iPads.

While the 3D field is enabled, the Media Library accepts .glb, .gltf, .usdz and .hdr uploads, so you can upload models like any other file. Free sample models to try: https://modelviewer.dev/shared-assets/.

4.2 Quick start with the generator

In the form editor click 3D model.

The 3D model tag generator

  • Field name — required, for example product.
  • Model URL — the .glb or .gltf file. Put a .usdz file on a second line for iOS augmented reality. Add from Media Library picks an uploaded model.
  • Title / accessible description — used as the alt text, for example "A red armchair".

The sections below (Layout, Camera, Augmented reality, Lighting, Animation, Hotspots) are optional. Click Insert Tag.

4.3 Examples

The simplest tag:

[3d_models product "https://example.com/chair.glb"]

Spinning slowly, with the AR button and an iOS file:

[3d_models chair auto-rotate ar "https://example.com/chair.glb" "https://example.com/chair.usdz"] Red armchair [/3d_models]

A product shot: soft shadow, studio lighting, a pale background, two labelled hotspots and a custom AR button:

[3d_models product auto-rotate ar camera-orbit:28deg|74deg|auto shadow-intensity:1 shadow-softness:0.6 environment:neutral exposure:1.15 height:470 bg:#F2F7FF hotspot:0|0.75|0.25|Hand_finished_top hotspot:0.75|-0.16|0|Solid_oak_core ar-button-label:View_in_your_room "https://example.com/plinth.glb"] The Plinth [/3d_models]

4.4 Rules worth knowing

  • Values with several parts use |: camera-orbit:0deg|75deg|105% becomes 0deg 75deg 105%.
  • Lengths accept m, cm, mm, deg, rad, % or auto.
  • Use _ for a space in labels: Hand_finished_top.
  • The first non-USDZ URL is the model; the first .usdz URL is used for iOS.

4.5 All options

Layout and appearance

Option Values What it does
height: 100–2000 Viewer height in px. Empty = the settings default (400).
width: 100–4000 Maximum width in px.
align: center, right Alignment. Empty = left.
bg: hex Background colour. Ignored when a skybox is set.
poster-color: hex Colour shown while loading.
progress-color: hex Colour of the loading bar.
progress-height: 0–50 Thickness of the loading bar.
no-progress-bar flag Hide the loading bar.

Loading

Option Values What it does
poster: image URL Picture shown until the model has loaded.
loading: lazy, eager When to load. Empty = when it comes near the screen.
reveal: manual Keep the poster until the visitor interacts.
with-credentials flag Send cookies when fetching the model.
generate-schema flag Add 3DModel structured data for search engines.

Camera and interaction

Option Values What it does
no-camera-controls flag Visitors cannot rotate or zoom.
auto-rotate flag Spin slowly.
no-auto-rotate flag Never spin, even if the settings default says so.
auto-rotate-delay: ms Idle time before spinning starts.
rotation-per-second: e.g. 30deg Spin speed.
camera-orbit: theta|phi|radius, default 0deg|75deg|105% Starting camera position.
camera-target: x|y|z Point the camera looks at.
field-of-view: e.g. 30deg Zoom level.
min-camera-orbit: / max-camera-orbit: theta|phi|radius Limits of camera movement.
min-field-of-view: / max-field-of-view: e.g. 10deg Zoom limits.
disable-zoom / disable-pan / disable-tap flags Turn off zooming, panning, tap-to-recentre.
touch-action: pan-y, pan-x, none pan-y lets phone users scroll the page over the model.
orbit-sensitivity: / zoom-sensitivity: / pan-sensitivity: number How fast each gesture moves.
interaction-prompt: none Hide the "drag to rotate" hint.
interaction-prompt-style: basic A simpler hint.
interaction-prompt-threshold: ms Delay before the hint.
interpolation-decay: ≥1, default 50 Camera smoothing.

Augmented reality

Option Values What it does
ar flag Show the "View in your space" button.
no-ar flag Never show it, even if the settings default says so.
ar-modes: webxr, scene-viewer, quick-look, separated by | AR methods in order of preference. Quick Look (iOS) needs a USDZ file.
ar-scale: fixed Stop visitors resizing the model in AR.
ar-placement: wall Place on a wall instead of the floor.
ios-src: URL The USDZ file, if not given as a second URL.
usdz-max-texture-size: ≥16 Texture size limit for auto-generated USDZ.
xr-environment flag Use real-world lighting in WebXR.
ar-button-label: text Label of the AR button. Use _ for spaces.

Lighting and environment

Option Values What it does
environment: neutral, legacy, or an .hdr/.jpg URL Lighting. neutral is even studio light.
skybox: image URL Background panorama.
skybox-height: e.g. 1.5m Project the skybox onto the ground.
exposure: ≥0, default 1 Brightness.
tone-mapping: neutral, aces, agx, reinhard, cineon, linear, none Colour response.
shadow-intensity: 0–1 Strength of the ground shadow.
shadow-softness: 0–1 Blur of the ground shadow.

Animation and variants

Option Values What it does
animation: name Which animation in the file to play.
autoplay flag Play it automatically.
crossfade: ms Blend time between animations.
variant: name Which material variant to show.
orientation: roll|pitch|yaw Rotate the model, e.g. 0deg|0deg|90deg.
scale: x|y|z Scale the model, e.g. 0.5|0.5|0.5.
bounds: tight, legacy How the model's size is measured.

Hotspots

A hotspot is a labelled dot pinned to a point on the model.

Option Values What it does
hotspot: x|y|z|Label, one option per hotspot Position in metres, label optional. Add |nx|ny|nz for the surface direction if needed.
min-hotspot-opacity: 0–1 How visible a hotspot is when behind the model.
max-hotspot-opacity: 0–1 How visible when in front.
[3d_models chair hotspot:0|0.5|0.2|Handle hotspot:-0.3|0.1|0|Base_plate "https://example.com/chair.glb"]

To find coordinates, open the model at https://modelviewer.dev/editor/, click the surface and read the position.

Advanced

Option What it does
seamless-poster Fade the poster into the rendered model.
id: / class: Standard Contact Form 7 options.

4.6 Site-wide defaults

Contact → Media Fields → 3D Models sets the default height, colours, camera controls, auto-rotate, the interaction prompt, AR, lighting, tone mapping, exposure, shadow and loading strategy. See Settings.

6. PDF flipbook field

Shows a PDF inside the form, either as a book whose pages turn, or as pages stacked one under the other. Visitors can zoom, go fullscreen and, if you allow it, download the file. Good for catalogues, brochures, price lists and menus that you want people to read before they fill in the form.

A catalogue as a flipbook inside a form

6.1 Quick start with the generator

In the form editor click PDF.

The PDF tag generator

  • Field name — required, for example catalogue.
  • PDF URL — the file. Select from Media Library picks an uploaded PDF.
  • Loading text — optional; shown while the document loads.
  • Open the Layout and Viewer sections for size, Flipbook or Scroll mode, start page and the toolbar buttons.

Click Insert Tag.

6.2 Examples

[pdf_flipbook brochure "https://example.com/brochure.pdf"]

A taller viewer that loads straight away and allows download:

[pdf_flipbook catalogue height:560 eager download "https://example.com/catalogue.pdf"] Loading the catalogue… [/pdf_flipbook]

Scrolling pages, opening on page 3, no toolbar:

[pdf_flipbook terms mode:scroll start-page:3 no-toolbar "https://example.com/terms.pdf"]

6.3 Rules worth knowing

  • Only the first URL is used.
  • The PDF is loaded when it scrolls into view, so a long page with a flipbook near the bottom does not download the file until needed. Add eager to load it immediately.
  • The download button is hidden by default so the document stays inside your page. Add download to show it.
  • Large PDFs render page by page; the first page appears as soon as it is ready.

6.4 All options

Layout

Option Values What it does
height: 200–2000 Viewer height in px. Default 520.
width: 200–4000 Maximum width in px.
align: center, right Alignment. Empty = left.
bg: hex Background behind the pages.

Viewer

Option Values What it does
mode: scroll Stacked pages. Empty = flipbook (or the settings default).
start-page: 1–9999 Page to open on.
single-page flag One page at a time, never a two-page spread.
flip-time: 100–3000 Page turn duration in ms. Default 800.
no-shadow flag No page-turn shadow.
eager flag Load immediately.

Toolbar

Option What it does
no-toolbar Hide the whole toolbar.
no-nav Hide previous / next and the page counter.
no-zoom Hide zoom in / out.
no-fullscreen Hide the fullscreen button.
download Show a download button.

Advanced

Option What it does
id: / class: Standard Contact Form 7 options.

6.5 Site-wide defaults

Contact → Media Fields → PDF Flipbook sets the default height, background, mode, page-turn duration and whether the toolbar shows. See Settings.

7. Settings

Contact → Media Fields holds the site-wide defaults. Set something here once and every form uses it; a tag option in one form always overrides the default for that form only.

The Media Fields dashboard

7.1 Overview

The Overview page shows one card per field type. Each card has:

  • an on/off switch — switch a field type off and its tags render nothing for visitors (editors see a small notice in the form editor instead), and its assets are no longer loaded;
  • a Configure button that jumps to that field's defaults.

Below the cards, Watch and learn holds the two tutorial videos. Hide videos collapses the panel; the choice is remembered per user.

Click Save changes after any change. An unsaved-changes hint appears next to the button when something differs from what is stored.

7.2 Video

Video defaults

Setting Default What it does
Accent colour Plyr blue Colour of the controls in every video player.
Default controls large play, play, progress, current time, mute, volume, captions, settings, PiP, AirPlay, fullscreen Buttons shown when a tag does not set controls:.
Settings menu captions, quality, speed Items in the gear menu when a tag does not set settings:.
Remember visitor preferences on Remember volume, speed and captions in the visitor's browser.
Auto-hide controls on Hide the controls while playing until the mouse moves.

7.3 Audio

Audio defaults

Same settings as Video, with the choices narrowed to what makes sense for audio. Default controls: play, progress, current time, mute, volume, settings. Default settings menu: speed.

7.4 3D Models

3D model defaults

Setting Default What it does
Viewer height 400 px Height when a tag does not set height:.
Background / Poster / Progress bar colour Colours of the viewer, the loading poster and the loading bar.
Camera controls on Visitors can rotate and zoom.
Auto-rotate off Models spin slowly.
Interaction prompt on The "drag to rotate" hint.
Augmented reality off Show the AR button on every model.
Environment lighting model-viewer default Default, Neutral (even studio light) or Legacy (warmer).
Tone mapping neutral Colour response: Neutral, ACES, AgX, Reinhard, Cineon, Linear, None.
Exposure 1 Brightness.
Shadow intensity 0 Ground shadow strength.
Loading strategy auto Load when near the screen, or immediately.

7.5 Image Gallery

Gallery defaults

Setting Default What it does
Default layout Grid Grid, Masonry, Justified rows or Carousel.
Columns 3 Columns on desktop.
Gap between images 8 px
Thumbnail ratio 4:3 Original, 1:1, 4:3 or 16:9.
Row height for justified / carousel 240 px
Lightbox on Click to open full size.
Show captions off Captions under every image. Applies to every gallery when on.

7.6 PDF Flipbook

PDF flipbook defaults

Setting Default What it does
Viewer height 520 px
Background colour Behind the pages.
Default mode Flipbook Flipbook or Scroll.
Page turn duration 800 ms
Toolbar on Show the toolbar under the viewer.

7.7 General

General settings

Setting Default What it does
Player build Standard Standard is smaller and suits modern browsers. Polyfilled adds support for older browsers.
Load assets on every page off Normally the player scripts load only on pages that contain a media field. Turn this on if a page builder or a cache plugin loads forms in a way the plugin cannot detect and the players appear unstyled.
Delete settings on uninstall off Remove the plugin's settings from the database when it is deleted.

7.8 Tag reference

The tag reference

A read-only cheat sheet with one working example per field type and the ordering rules, for copying into a form.

8. FAQ and troubleshooting

General

Do media fields send anything with the email? No. They display content; they collect nothing. That is why they are not offered in the Mail tab and the generator says there is no mail-tag.

Why does the field need a name if nothing is submitted? Contact Form 7 requires every form-tag to have a name. Any name will do.

Can I put more than one media field in a form? Yes, as many as you like, of any type. See the "Commission enquiry" form on the demo site, which combines a video and a gallery.

Does the plugin load anything from other servers? No. The players and viewers (Plyr, model-viewer, PDF.js, StPageFlip) are bundled with the plugin and served from your site. YouTube and Vimeo videos naturally come from YouTube and Vimeo, and only once a visitor presses play (or immediately, if you set autoplay).

Does it work with page builders? Yes, wherever the Contact Form 7 shortcode works. If a player appears unstyled inside a builder or a popup, turn on Load assets on every page in Settings → General.

The form editor

The tag I typed shows as plain text on the page. Check the order: type, name, options, then the quoted URL(s) last. A URL before an option breaks the tag. Use the generator to avoid this.

The tag renders nothing at all. The field type may be switched off in Contact → Media Fields → Overview. Editors see a notice in the editor; visitors see nothing.

"Add from Media Library" closes the tag generator. That is expected. Contact Form 7's dialog sits above everything else, so the plugin closes it while the Media Library is open and reopens it, with your values intact, when you are done.

I cannot upload a .glb / .usdz file. Make sure the 3D field is enabled in Settings. Uploads of .glb, .gltf, .usdz and .hdr are allowed only while it is.

Video and audio

Autoplay does not work. Browsers only allow autoplay when the media is muted. Use autoplay muted together.

The quality menu is empty. Quality switching for your own files needs one file per quality with a size hint: "video-720.mp4|720" "video-1080.mp4|1080". YouTube and Vimeo manage quality themselves.

Captions do not show. Captions need WebVTT (.vtt) files. If the file is on another domain, add the crossorigin flag and make sure that server sends CORS headers.

A YouTube video says "Error 153" or "Video player configuration error". Your site sends a strict Referrer-Policy header (often same-origin), so YouTube cannot see which site is embedding the video. The plugin sets the correct policy on its own players, but if you embed YouTube some other way on the same page that embed will still fail. The fix at the source is to set the site's policy to strict-origin-when-cross-origin.

The video is huge / tiny. Set width: for a maximum width, or ratio: to control the shape. The player is always as wide as the form unless you limit it.

3D models

The model is cropped or off-centre. Use camera-orbit: with auto for the radius, for example camera-orbit:0deg|75deg|auto, or set camera-target:auto|auto|auto. You can also try bounds:tight.

The model is dark. Add environment:neutral and raise exposure: (try 1.2).

The AR button does not appear on iPhone. iOS needs a USDZ file. Add it as a second URL or with ios-src:.

Hotspots are in the wrong place. Positions are in metres in the model's own coordinate system. Open the model at https://modelviewer.dev/editor/, click the surface and copy the coordinates shown.

Gallery

I turned on captions in Settings and now every gallery has them. The setting applies to every gallery, and there is no per-gallery option to remove them. Turn the setting off and add the captions flag only to the galleries that need it.

Images are cropped. Add contain to fit the whole image, or set ratio: to match your images, or leave ratio: empty for the original shape.

Tiles are uneven in a grid. Set a ratio: — the grid uses it to keep every tile the same shape.

PDF flipbook

The PDF does not load. Check that the URL opens in a browser tab on its own. The file must be served over http or https from a server that allows it to be read (same site is always fine).

I want visitors to be able to download it. Add the download flag. It is hidden by default.

The pages look blurry. Zoom in with the toolbar; pages re-render at the new size. Very small viewers can be enlarged with height:.

Privacy and the opt-in

What does the opt-in share? WordPress and PHP versions, the active plugins and which media fields you use, through Freemius. Nothing is shared unless you allow it, and you can opt out from the Plugins screen at any time. See https://freemius.com/privacy/.

Still stuck?

Ask on the support forum: https://wordpress.org/support/plugin/b-media-fields-for-cf7/. Include the tag you used and, if possible, a link to the page.

9. For developers

The plugin is built around a schema for each field type, so most customisation is a filter away.

Filters

Filter Receives Use it to
bmfcf7_option_fields array of option definitions Add or change options for the video and audio tags and their generators.
bmfcf7_model_option_fields array Same for the 3D model tag.
bmfcf7_gallery_option_fields array Same for the gallery tag.
bmfcf7_pdf_option_fields array Same for the PDF flipbook tag.
bmfcf7_settings_schema array of settings sections Add a section or a setting to the settings screen.
bmfcf7_player_config Plyr config array, $tag, $provider (html5, youtube, vimeo) Change the final Plyr configuration for a video or audio player.
bmfcf7_model_viewer_atts attribute array, $tag Change the final <model-viewer> attributes.
bmfcf7_pdf_config config array, $tag Change the final PDF viewer configuration.
bmfcf7_frontend_data array Change the data passed to the front-end scripts.

Example: force a control set on every video

add_filter( 'bmfcf7_player_config', function ( $config, $tag, $provider ) {
    if ( 'video' === $tag->basetype ) {
        $config['controls'] = array( 'play', 'progress', 'fullscreen' );
    }
    return $config;
}, 10, 3 );

Example: add a tone-mapping default for all models

add_filter( 'bmfcf7_model_viewer_atts', function ( $atts, $tag ) {
    if ( empty( $atts['tone-mapping'] ) ) {
        $atts['tone-mapping'] = 'aces';
    }
    return $atts;
}, 10, 2 );

Markup

Every field is wrapped in a div.bmfcf7-player-wrap carrying a data-name attribute with the field name, plus type-specific classes you can style against:

Field Wrapper classes
Video / audio bmfcf7-video or bmfcf7-audio, and bmfcf7-provider-html5 / -youtube / -vimeo
3D model bmfcf7-model (the element itself is model-viewer.bmfcf7-model-viewer)
Gallery bmfcf7-gallery and bmfcf7-gallery--grid / --masonry / --justified / --carousel
PDF flipbook bmfcf7-pdf and bmfcf7-pdf--flip / --scroll

align:center / align:right add bmfcf7-align-center / bmfcf7-align-right. Anything given in a class: option is added to the same wrapper, and id: sets its id.

Assets

Player scripts and styles are enqueued only on pages where a form contains a media field, unless Load assets on every page is on. Bundled libraries and versions:

Library Version Licence
Plyr 3.8.4 MIT
model-viewer 4.3.1 Apache-2.0
PDF.js 3.11.174 Apache-2.0
StPageFlip 2.0.7 MIT

Source

The plugin is developed in the open: https://github.com/bPlugins/b-media-fields-for-cf7. Issues and pull requests are welcome.