DTX – Dynamic Text Extension for Contact Form 7
Contact Form 7 is an excellent WordPress plugin and one of the top choices of free WordPress plugins for contact forms. DTX – Dynamic Text Extension for Contact Form 7 makes it even more awesome by adding dynamic content capabilities. While default values in Contact Form 7 are static, DTX lets you create pre-populated fields pulled from other locations. Some examples might include: Auto-filling a URL or just getting the domain name or path Auto-filling a post ID, title, or slug Auto-filling a title, URL, or slug for the current page Pre-populating a product number Referencing other content on the site Populating with post or page info Populating with the current user’s info Populating with custom and meta fields Generating unique identifiers for support tickets Getting a list of post categories or other custom taxonomies Getting a value from a cookie Getting custom theme modifications Any value using custom shortcodes The possibilities are endless! View Demo For over 10 years, DTX only handled and form fields, but version 4 finally introduces more: email URL tel (for phone numbers) number range (slider) textarea (multiline text) drop-down menu (select field) checkboxes radio buttons date submit (yes, a submit button where you can have dynamic text!) WHAT DOES IT DO? DTX provides flexibility to WordPress users in creating dynamic forms in Contact Form 7. DTX comes with several built-in shortcodes that will allow the contact form to be populated from HTTPS GET variable or any info from the get_bloginfo() function, among others. See below for included shortcodes. Don’t see the shortcode you need on the list? You can write a custom one! Any shortcode that returns a string or numeric value can be used here. The included shortcodes just cover the most common scenarios, but DTX provides the flexibility for you to grab any value you have access to programmatically. Dynamic Value The bread and butter of this plugin, set a dynamic value! This field can take any shortcode, with two important provisions: The shortcode should NOT include the normal square brackets ([ and ]). So, instead of [CF7_GET key='value'] you would use CF7_GET key='value'. Any parameters in the shortcode must use single quotes. That is: CF7_GET key='value' and not CF7_GET key="value" Dynamic Placeholder Set a dynamic placeholder with this attribute! This feature accepts static text or a shortcode. If using a shortcode, the same syntax applies from the dynamic value field. However, this field also has a few more needs: The text/shortcode must first have apostrophes converted to it’s HTML entity code, ' After that, it must be URL encoded so that spaces become %20 and other non-alphanumeric characters are converted. If you’re using Contact Form 7’s tag generator to create the form tag, those extra needs are already taken care of. Dynamic placeholders are not available for dynamic hidden form tags. Learn more and see examples from the DTX Knowledge base. Compatible with Caching Plugins DTX is cache friendly! You can set a field to be calculated after the page loads by setting the dtx_pageload attribute to any dynamic form tag. Many websites use caching plugins to optimize for performance. If your website caches the HTML of the form, then any dynamic form fields you have get their first calculated value cached alongside it. This becomes an issue if you’re using DTX to pull values from a cookie or the current URL’s query string. This is best for dynamic form fields that: gets the current URL gets a value from the URL query gets a value from a cookie gets the current user’s info generates a unique identifier (GUID) For dynamic fields that are page-specific, it’s perfectly safe to cache those values. For example, dynamic form fields that: getting the page or post’s ID, title, or slug getting post meta for the current page getting the post’s assigned categories, tags, or other custom taxonomy getting site info getting theme modification values Note: Enabling a dynamic field to be calculated after the page loads will add frontend JavaScript. Depending on the shortcode used as the dynamic value, an AJAX call to the server may be sent to be processed. The script is minified and loaded in the footer and is deferred, minimizing impact on site performance and the AJAX calls are called asynchronously to avoid being a render-blocking resource and minimizing main-thread work. The script itself can be safely cached too. Learn more and see examples from the DTX Knowledge base. Read Only Form Fields Check this box if you do not want to let users edit this field. It will add the readonly attribute to the input form field. This feature is not available for dynamic hidden form tags. Obfuscate Values for Enhanced Privacy If you’re pre-filling a form field with an email address, bots can scrape that value from the page and use it for spam. You can add an additional layer of protecting by obfuscating the value, which turns each character into it’s ASCII code. To the human eye, it looks like the character it’s supposed to be because browsers will render the ASCII code, but for bots, it won’t look like an email address! HOW TO USE IT After installing and activating the plugin, you will have 2 new tag types to select from when creating or editing a Contact Form 7 form: the dynamic text field and dynamic hidden field. Most of the options in their tag generators will be familiar to Contact Form 7 users but there have been some upgrades. How to Obfuscate Values All of the shortcodes included with the DTX plugin allow the obfuscate attribute that you can set to any truthy value to provide an additional layer of security for sensitive data. The Contact Form 7 tag with obfuscation turned on would look like this: [dynamictext user_email "CF7_get_current_user key='user_email' obfuscate='on'"] How to Enable Cache-Friendly Mode All of the dynamic form tags can be enabled for processing on the frontend of the website, or the client-side, by adding the dtx_pageload attribute to the Contact Form 7 form tag. In the form editor of Contact Form 7, your form tag would look like: [dynamictext current_url dtx_pageload "CF7_URL"] If using the tag generator, it’s as simple as checking a box! INCLUDED SHORTCODES The plugin includes several shortcodes for use with the Dynamic Text Extension right out of the box. You can write your own as well—any self-closing shortcode will work, even with attributes! Current URL or Part Retrieve the current URL: CF7_URL In the form editor of Contact Form 7, your form tag would look like: [dynamictext dynamicname "CF7_URL"] Optional parameter: part, which will return a parsed part of the URL. Valid values are host, query, and path Host: Just the domain name and tld [dynamictext host “CF7_URL part=’host'”] Query: The query string after the ?, if one exists [dynamictext query “CF7_URL part=’query'”] Path: The URL path, for example, /contact, if one exists [dynamictext path “CF7_URL part=’path'”] Learn more and see examples from the DTX Knowledge base. Referrer URL Get the referral URL, if it exists. Note that this is not necessarily reliable as not all browsers send this data. CF7 Tag: [dynamictext dynamicname "CF7_referrer"] Learn more and see examples from the DTX Knowledge base. Current Page Variables Retrieve information about the current page that the contact form is displayed on. Works great for use in templated areas like the site header, footer, widget, or sidebar! The shortcode works as follows: Built-in shortcode: CF7_get_current_var Required attribute: key Possible values for key include: id title url (an alias for CF7_URL) slug featured_image terms (an alias for CF7_get_taxonomy) For pages that use a WP_POST object, this acts as an alias for CF7_get_post_var so those attributes work here as well. For author pages, this acts as an alias for CF7_get_current_user so those attributes work here as well. In the form editor of Contact Form 7, your form tag’s value could look like: CF7_get_current_var key='title' And then the full form tag would be: [dynamictext dynamicname "CF7_get_current_var key='title'"] Learn more and see examples from the DTX Knowledge base. Post/Page Info Retrieve information about the current post or page (must be for a WP_POST object) that the contact form is displayed on. The shortcode works as follows: CF7_get_post_var key='title' Contact > Dynamic Text Extension > Meta Key Allow List. More Information The dynamic value input becomes: CF7_get_custom_field key='my_custom_field' And the tag looks like this: [dynamictext dynamicname "CF7_get_custom_field key='my_custom_field'"] For the purposes of including an email address, you can obfuscate the custom field value by setting obfuscate=’on’ in the shortcode like this: [dynamictext dynamicname “CF7_get_custom_field key=’my_custom_field’ obfuscate=’on'”] Learn more and see examples from the DTX Knowledge base. Featured Images & Media Attachments Retrieve the current post’s featured image, the featured image of a different page, or any attachment from the Media Library with this shortcode! The base shortcode is simply: CF7_get_attachment which returns the absolute URL of the current page’s featured image. By setting the post_id attribute to a post ID, you can get the featured image of another page. By setting the id attribute to an attachment ID, you can get the absolute URL of any image uploaded to your WordPress website. By setting the size attribute to any size registered on your website, you can get a specific image size. Want to return the attachment ID instead of the URL? Also not a problem! Just set return='id' in the shortcode. Most of the optional attributes can be used at the same time. For example, if I wanted to retrieve the attachment ID of a featured image for a different post, then the dynamic text form tag would look like this: [dynamictext input_name “CF7_get_attachment post_id=’123′ return=’id'”] If I wanted to get a specific image at a specific size, I can use this: [dynamictext input_name “CF7_get_attachment id=’123′ size=’thumbnail'”] The only two attributes that can’t play together is id and post_id. If both are specified, it will get the attachment specified by id and completely ignore the post_id attribute. If neither are specified, then it looks to the current featured image assigned to the global $post object. Learn more and see examples from the DTX Knowledge base. Current User Info & User Meta Get data about the current logged-in user. Dynamic value: CF7_get_current_user key='user_displayname' CF7 Tag: [dynamictext dynamicname "CF7_get_current_user"] Note: You must add any user keys that you want to allow access to to the allow list in your admin panel > Contact > Dynamic Text Extension > User Data Key Allow List. More Information Valid values for key include: ID user_login display_name user_email user_firstname user_lastname user_description But also custom meta user keys! For the purposes of including an email address, you can obfuscate the value by setting obfuscate=’on’ in the shortcode like this: [dynamictext dynamicname “CF7_get_current_user key=’user_email’ obfuscate=’on'”] Learn more and see examples from the DTX Knowledge base. Site/Blog Info Want to grab some information from your blog like the URL or the site name? Use the CF7_bloginfo shortcode. For example, to get the site’s URL: Enter the following into the “Dynamic Value” input: CF7_bloginfo show='url' Your Content Form 7 Tag will look something like this: [dynamictext dynamicname "CF7_bloginfo show='url'"] Your form’s dynamicname text input will then be pre-populated with your site’s URL Learn more and see examples from the DTX Knowledge base. Theme Options Want to retrieve values from your active theme’s Customizer? Now you can with the CF7_get_theme_option shortcode. Learn more and see examples from the DTX Knowledge base. HTTP GET Variables Want to use a variable from the PHP $_GET array? Just use the CF7_GET shortcode. For example, if you want to get the foo parameter from the url http://mysite.com?foo=bar Enter the following into the “Dynamic Value” input: CF7_GET key='foo' Your Content Form 7 Tag will look something like this: [dynamictext dynamicname "CF7_GET key='foo'"] Your form’s dynamicname text input will then be pre-populated with the value of foo, in this case, bar Learn more and see examples from the DTX Knowledge base. HTTP POST Variables Grab variables from the PHP $_POST array. The shortcode is much like the GET shortcode: Dynamic value: CF7_POST key='foo' Your Content Form 7 Tag will look something like this: [dynamictext dynamicname "CF7_POST key='foo'"] Learn more and see examples from the DTX Knowledge base. Cookie Values If your WordPress website uses cookies, you might want to pull the value of a specific cookie into a form. You can do that with the CF7_get_cookie shortcode. It only needs a key attribute. Dynamic value: CF7_get_cookie key='foo' Your Content Form 7 Tag will look something like this: [dynamictext dynamicname "CF7_get_cookie key='foo'"] Learn more and see examples from the DTX Knowledge base. GUID Generate a globally unique identifier (GUID) in a form field. This is a great utility shortcode for forms that need unique identifiers for support tickets, receipts, reference numbers, etc., without having to expose personally identifiable information (PII). This shortcode takes no parameters: CF7_guid In the form editor of Contact Form 7, your form tag would look like: [dynamictext dynamicname "CF7_guid"] Learn more and see examples from the DTX Knowledge base.
Top keywords
- form49×2.10%
- cf745×1.93%
- dynamic32×1.37%
- url29×1.25%
- dtx26×1.12%
- shortcode26×1.12%
- value26×1.12%
- current25×1.07%
- key25×1.07%
- post24×1.03%
- tag21×0.90%
- contact20×0.86%
Yoast SEO – Advanced SEO with real-time guidance and built-in AI
Real-time SEO guidance, schema, and AI built in. Help search engines and AI systems understand your content. All AI tools included, no hidden fees. Yoast SEO: the #1 WordPress SEO plugin Since 2008, Yoast SEO has helped site owners get their content found. More than 10 million websites now run it, from small local businesses to some of the most visited sites on the web. Our mission is SEO for everyone. You should not need a specialist, a big budget, or a technical background to give your content a fair chance of being discovered. Yoast SEO gives you everything you need to manage your on-site SEO. The Yoast SEO Premium plugin and its extensions unlock more advanced and AI-powered tools. Ready for search, and ready for AI People no longer only type queries into Google. They ask AI assistants, and those answers are built from content the AI has crawled, understood, and trusted. Yoast SEO helps you prepare for both. Schema.org structured data, so search engines and AI systems can understand what your content is actually about. Premium outputs significantly more schema types, including the E-E-A-T signals (experience, expertise, authoritativeness, and trustworthiness) that help AI systems understand who you are. Schema aggregation for NLWeb (Premium), which combines your site’s structured data into a single, deduplicated graph, so AI agents get a complete picture of your content in one request. Turn it on with a single toggle. LLMs.txt management, to guide how large language models interact with your content, including manual control over which pages are included. Bot blocker (Premium), to control which AI crawlers can use your content for training, including GPTBot, CCBot, and Google-Extended. Abilities API, so AI tools, dashboards, and automated workflows can read your SEO, readability, and inclusive language scores directly. Algorithm changes have been arriving for over 15 years, and Yoast has tracked every one of them. Keeping the plugin updated means you benefit from ongoing technical improvements, schema updates, and AI advancements automatically, all guided by our signature traffic light approach. Real-time guidance while you write SEO is one of the most consistent and cost-effective sources of website traffic, though it can be complex. Whether you are just starting out or you have done this for years, Yoast SEO tells you what to fix before you publish, not after. Red, orange, green. That is the whole idea. You get in-depth content and readability analysis that helps you create content designed to perform well in search, without needing to learn a new discipline first. Quick and easy setup Setting up Yoast SEO is quick and straightforward. No technical background required. Our step-by-step configuration wizard walks you through the essentials, so Yoast SEO can generate accurate structured data that helps search engines understand your site. Switching from another SEO plugin? Migration is seamless. You can import your existing SEO data and settings safely with our built-in import and export tools. AI tools built into your workflow Yoast’s AI tools come with Yoast SEO Premium, and they sit inside the editor you already use. There is no separate AI subscription, no extra login, and no credit top-up to buy. Every suggestion waits for your approval before anything saves. Yoast AI Generate: creates five SEO-friendly titles and meta descriptions instantly, with one-click regeneration for more options. Yoast AI Optimize: suggests improvements to keyphrase placement, including introduction, distribution, and density, with the option to apply or dismiss each edit. Yoast AI Summarize: generates a quick summary of your post to place anywhere in the block editor, so readers grasp the value fast. Yoast AI Content Planner (Premium): suggests five site-specific post ideas and builds a structured starter draft the moment you open a new post. Ideas are grounded in your own site, not generic topics, so your team never begins from a blank page. Bulk editor with AI drafts: review and fix titles, meta descriptions, and focus keyphrases across your whole site from one workspace, with search and status filters and a dedicated view per content type. The bulk editor is free. With Premium, select what needs work and AI drafts the metadata, including social sharing titles and descriptions, for you to approve. All AI tools included: no extra accounts, no separate credit purchase, no hidden costs. Content analysis and optimization SEO analysis to guide your keyword targeting, with up to 5 keyphrases in Premium and support for 20+ languages. Readability analysis for clear, engaging, user-friendly writing. Inclusive language analysis, so your content is more considerate and accessible. SERP previews for both desktop and mobile results. HowTo and FAQ blocks with built-in schema support. Breadcrumbs block for improved navigation. Semrush integration for keyword research directly inside Yoast SEO. Wincher integration to track keyword performance from your dashboard. Elementor integration for optimization inside your favorite builder. Technical SEO, handled for you Yoast SEO takes care of much of your site’s technical SEO automatically, which frees you to focus on your content. Automated meta tag optimization right out of the box. Canonical URLs to prevent duplicate content issues. Advanced XML sitemaps for clear site indexing. Deep Schema.org integration to improve how search engines and AI systems understand your site. Complete breadcrumb control for visitors and crawlers. Performance improvements that help reduce load times. Crawl settings to manage how bots access your site and reduce unnecessary server load. Every update delivers ongoing technical SEO enhancements automatically. Keep your website in perfect shape Whether you are a creator, a business owner, or a developer, Yoast SEO helps you maintain your site’s SEO health: Cornerstone content tools to organize and prioritize your key pages. Front-end SEO inspector to view and edit titles, descriptions, and schema live. SEO roles to delegate plugin access securely across your team. Regular 2-week update cycle, so you stay compatible with the latest SEO standards and search engine changes. Powerful integrations Yoast SEO works seamlessly with popular WordPress tools: Google Site Kit: access insights from Search Console, Analytics, and PageSpeed inside WordPress. Advanced Custom Fields (ACF): combine with ACF Content Analysis for Yoast SEO for advanced field optimization. Elementor: use full Yoast SEO functionality inside Elementor’s editor. Algolia: improve internal search accuracy and performance. Semrush: discover and optimize for high-value keywords. Wincher: track keyword positions and trends in Google Search. Jetpack: manage SEO and social previews in one place. Easy Digital Downloads (EDD): improve digital product visibility with integrated schema. Mastodon: verify your website on Mastodon with Yoast SEO Premium. WooCommerce: optimize ecommerce SEO with the dedicated WooCommerce extension. Yoast SEO Premium: AI-powered SEO for WordPress Yoast SEO Premium builds on everything above with advanced automation, AI tools, and professional support. It helps you optimize efficiently for both traditional search and AI-driven discovery. What it helps you tackle: Keeping pace with algorithm changes and AI search. Reaching the right audience. Automating redirects, crawl controls, and internal linking. Finding orphaned content and improving your site structure. Getting expert help when you need it. Premium highlights: AI-generated titles and meta descriptions, page by page or in bulk. AI Content Planner, so you never open a blank page. Smart internal linking suggestions to strengthen your site structure. Social previews for Facebook and X. Redirect manager with bulk tools, CSV import and export, and automatic prompts when you move or delete content. Bot blocker for AI crawlers, including GPTBot, CCBot, and Google-Extended. Schema aggregation for NLWeb, plus significantly more schema types than free. IndexNow integration, so search engines hear about your updates the moment you publish. Front-end SEO inspector for real-time editing. SEO workouts for orphaned and cornerstone content. Task list, unlocked in full, showing what to work on next with priority levels and time estimates. Google Docs add-on, so writers can run the full Yoast analysis before content ever reaches WordPress. One seat included. 24/7 premium support from SEO specialists. Included at no extra cost: Yoast Local SEO: help nearby customers find you, with local schema, a store locator, and opening hours management. Yoast Video SEO: help Google understand your videos, with video sitemaps and schema. Yoast News SEO: help your news content get discovered in Google News and Top Stories. Yoast WooCommerce SEO: advanced SEO for online stores Yoast WooCommerce SEO builds on Yoast SEO Premium with ecommerce-specific tools for your store’s visibility. Key ecommerce features: WooCommerce-specific XML sitemap that excludes non-shopping content. Product structured data for rich results, including price, reviews, and availability. Canonical URL management to prevent duplicates. Ecommerce-focused content analysis for GTINs, SKUs, and short descriptions. AI Generate for ecommerce: optimized titles and meta descriptions for product and category pages, at page level or drafted in bulk for products and categories. What that gets you: Better product visibility through automated structured data. More efficient crawling for large catalogs. Time saved through metadata templates and automation. Metadata across your whole catalog without editing rows one at a time. Built for WooCommerce, trusted by thousands of online stores worldwide. For developers Yoast SEO is built with developers in mind. With modern APIs, hooks, and a unified indexables system, you can extend or integrate SEO functionality across custom themes, plugins, or headless setups. REST API Retrieve SEO metadata for any post or URL, including meta tags, Open Graph, Twitter Cards, and Schema.org data. Learn more about the REST API. Surfaces API Access SEO data directly in code via YoastSEO()->meta->for_current_page(). Supports titles, descriptions, canonicals, and schema. Read the Surfaces API documentation. Metadata API Use the Metadata API to filter, override, or extend meta tags with WordPress hooks such as wpseo_title, wpseo_metadesc, and wpseo_canonical. Schema API The Schema API lets you modify or extend Schema.org graph pieces, including Article, Organization, Person, Breadcrumb, and WebPage entities. Abilities API integration Let AI tools, dashboards, and automated workflows read Yoast SEO data programmatically, including SEO, readability, and inclusive language scores for recent posts. Block editor compatibility Yoast SEO integrates directly with the WordPress block editor. It outputs schema for HowTo and FAQ blocks by default, and you can extend schema for custom blocks. Indexables At the core of Yoast SEO lies the indexables system, unifying all SEO data for faster queries and consistent metadata across outputs. Ongoing support and education Yoast is powered by expert developers, testers, and SEO specialists who keep improving the plugin. We are committed to helping you grow your SEO skills: Yoast SEO Academy: free and premium SEO courses, included in all paid plans. Yoast SEO blog, newsletter, and webinars. Yoast SEO Update podcast for the latest SEO insights. Bug reports on GitHub, for issue tracking rather than support. Yoast SEO: built to make search optimization accessible, reliable, and ready for the future of AI search.