If you haven’t already, please install/activate the plugin before proceeding.
New form fields
The Contact Form 7 Dynamic Text Extension (DTX) adds two form field tags to Contact Form 7, dynamic text and dynamic hidden. They appear beside the other tags when editing a Contact Form 7 form.

Adding a dynamic field
Time needed: 5 minutes
Let’s walk through an example of adding a dynamic text field to a new contact form created by Contact Form 7 that prepopulates the field with the current user’s first name.
- Create/Edit your form
For this example, I’ll create a new form. In the screenshot below, you can see the default form and it’s four (4) form fields: your name, email, subject, and message.

- Add a dynamic field
In my example, I’ll create a form field for the user’s first name that automatically populates the value with the current user’s name from their WordPress profile. I start by clicking on the “dynamic text” button to open the form tag generator popup.
For this field, I’ll be using an included shortcode,CF7_get_current_userand setting the value ofkeytouser_firstnameso my dynamic value becomesCF7_get_current_user key='user_firstname'(be sure to use the correct syntax)
- Insert tag and save the form
I click the “Insert Tag” button in the form tag generator popup and I see my tag is added to the form as
[dynamictext* first-name "CF7_get_current_user key='user_firstname'"]
- Add form to page
Depending on the editor you’re using, add the form to your page. The screenshots below show the Gutenberg editor using the shortcode block and the Contact Form 7 block as an example.

- Preview page
After adding the form to a page, save it as a draft and click preview. You should now see your first name as it is entered in your WordPress profile set as the value of the first name form field.





