Great plugin, congratulations! I would like to use your plugin in a scenario where someone visits a page on our website that no longer exists, for example: https://www.example.com/offers/dog-leash/, and they are automatically redirected to https://www.example.com/page-not-exist/ where they can fill out a form. At this point, I want to use the referrer to determine which page the user initially tried to access, so that in the email it shows https://www.example.com/offers/dog-leash/, the URL of the non-existent page. Is this achievable with your plugin?
]]>I’ve recently discovered an error within browser dev console which exposes the hidden fields & data configured via the DTX plugin, including post author’s email which is considered sensitive. The following is a redacted excerpt of the error, referencing “non-unique id’s” being used across the ‘dynamichidden’ fields configured within the contact form. When attempting to add a unique id or class to the string, the syntax isn’t accepted. This occurs on all pages where this contact form is being used:
[DOM] Found 4 elements with non-unique id #: (More info: )
“input type=?”hidden” name=?”custom-post-author-name-shortcode” id class=?”wpcf7-form-control wpcf7-hidden wpcf7dtx wpcf7dtx-hidden” aria-invalid=?”false” value=?”NAME REDACTED””
“input type=?”hidden” name=?”your-email” id class=?”wpcf7-form-control wpcf7-hidden wpcf7dtx wpcf7dtx-hidden” aria-invalid=?”false” value”
“input type=?”hidden” name=?”Posttitle” id class=?”wpcf7-form-control wpcf7-hidden wpcf7dtx wpcf7dtx-hidden” aria-invalid=?”false” value=?”TITLE REDACTED””
“input type=?”hidden” name=?”custom-post-author-email-shortcode” id class=?”wpcf7-form-control wpcf7-hidden wpcf7dtx wpcf7dtx-hidden” aria-invalid=?”false” value=?”[email protected]””
Keen to understand how to resolve the issue.
Many thanks in advance.
]]>Recently updated from version 4.2.3 to 4.5.1 and am now getting the following error when the Contact Form 7 – Dynamic Text Extension is activated Deprecated: WPCF7_TagGenerator::add(): Use of tag generator instances older than version 2 is deprecated. Version 1 instance (dynamic text) detected.
Contact Form 7 is version 6.0
]]>Hello, I just ask a question to know if your plugin is right for me.
With a plugin of mine I register some user data as user meta. The data are arrays of arrays.
I would like to use the data to dynamically display checkboxes in the form. The number of checkboxes is variable and depends on the data associated with the users (a user can have 1 to n checkboxes associated).
When the checkbox to display is only one, possibly the checkbox should appear checked and not clickable or, better, it should convert to a hidden field.
Is it possible to do this with your plugin?
Hi there,
I need a shortcode for a dynamic text form tag, who can reveal an ID of custom post types (used CPT UI plugin) similar to post_title ( [dynamictext inputname “CF7_get_post_var key=’post_title'”] ).
I tried with this:
[dynamictext inputname “CF7_get_post_var key=’ID'”]
…… it works, but it doesn’t give me the correct ID, shows the one automatically assigned by WordPress.
I have CPT named ‘Jobs’ with a custom taxonomy named ‘Jobs ID’ ( id_jobs ->taxonomy slug ) for every Job/ post, which I want to use in the field. So I tried to use the slug as the value key=’id_jobs’ here [CF7_get_current_var key=”<insert key>”]
[dynamictext inputname “CF7_get_post_var key=’id_jobs'”]
It shows an empty string, because the key value is not correct or it’s not on the allow list.
Anyone with an idea how to dynamically autofill the ID field (like post_title) to include the custom ID of the current post? Thanks in advance.
]]>Since my English is only rudimentary, I would like to apologize in advance for having to consult the Google translator.
Hello.
It’s been a long time since I used DTX for the first time and then only the “dynamictext” function. After a long time, I have now discovered the new possibilities of DTX and I am still enthusiastic about your work on this plugin.
But since I’m now building a contact form for the first time in years that includes a “subject selection” using a drop-down, I definitely need your help. Thank you in advance for your support.
Initial situation:
The contact form provides the visitor with 5 subject options from which they can select one using the drop-down. So far, so simple.
Objective:
In addition – and this is where DTX is used, there are 5 different buttons spread across the website (form action with method=”post”), which refer to the contact form and are intended to pre-select a specific subject in the drop-down.
My problem:
I’ve already searched through your knowledge base about “Dynamic Select” and tested various things, but to be honest, due to my lack of English knowledge, I only partially understand what it means and I can’t really get used to the form tag generator clear.
I tried the code below, but it only created an additional entry in the drop-down selection. I suspect that this is completely wrong and that some shortcode needs to be written into the functions.php, which unfortunately I have next to no idea about.
Code used for Dynamic Select:
[dynamic_select* subject placeholder:Please select include_blank dtx_disable_blank "CF7_POST key='subject_name'" "Subject example 1" "Subject example 2" "Subject example 3" "Subject example 4" "Subject example 5"]
Code used for the Form action button:
<form action="https://example.com/contactform/" method="post">
<input type="hidden" name="subject_name" value="Subject example 3">
<button name="Kontakt" title="Kontakt aufnehmen">Kontakt aufnehmen</button>
</form>
It would be great if you could help me here by giving me a functional example of how the code should look correctly and what needs to be written in the functions.php.
Thanks so much
Best regards
Werner
I would like to have the Name of the author in a contact form I am using.
I tried [dynamic_text dynamictext-50 “CF7_get_post_var key=’post_author'” ] but this returns only the ID, not the name of the author.
How could I get the name here?
Plus – if this is possible – I am using Events Manager Plugin and I’d love also to have the name of the contact person of the respective Event as dynamic text. Is there any easy way to do this?
Regards
Michaela
Hello !
Great plugin ??
I try to set a placeholder on a dynamic_textarea.
Here my code : [dynamic_textarea dynamic_textarea-370 dtx_pageload placeholder:Ex%20%3A%20Je%20veux%20manger%20moins%2Fplus%20de%20viande]
Nothing is shown on my textarea … : https://ibb.co/QXK01nW
What i do wrong ?
]]>The example I am looking at (https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/custom-shortcodes/dynamic-options-for-select-checkbox-radio/#set-default-value-for-html-options) does not work to create checkboxes. I have scoured the help and forums, and google and simply can’t find how the shortcode is supposed to be written so as to dyamically create text boxes with some default values checked.
Now, when I looked at the example, it seemed obvious it would not work because checkboxes do not use the option tag, but could not be sure without digging in to the code (maybe you folks have written it so that they do within this plugin)
That being said, I would appreciate it if someon could give me some simply wokring code to accomplish this and I can build it out from there.
Thank You
]]>Dear Tessa,
Located on Enquiry Form Pop Up via Enquiry BUTTON on linked page. I need help and direction displaying the Product Name and Featured Image within the form and also within the email from CF7.
Here is a screen shot of the code I have tried on the CF7 Form:
I’m using the latest wordpress version, Kadence pro child theme and up to date woo-commerce.
Thank you for your wisdom and guidance! How do you like your coffee?
]]>I have a CPT where different To e-mail addresses and From name and e-mail addresses are stored.
The ACF fields are added in the contact form as shown in the screenshot: https://scrnli.com/files/UnW0FP7qeY3xaq
But in the mail tab I get the error message “The dynamic hidden form tag must have a default value” for these 3 fields.
Screenshot: https://scrnli.com/files/v1WG4w69aY4JVI
How can I solve this problem?
]]>The contact form on the page has the following tag:
[dynamic_hidden service-name id:service-name "CF7_GET key='Service-Name'"]
But the hidden field has no ID attribute:
<span class="wpcf7-form-control-wrap service-name" data-name="service-name"><input type="hidden" name="service-name" id="" class="wpcf7-form-control wpcf7-hidden wpcf7dtx wpcf7dtx-hidden" aria-invalid="false" value="Personal Life Coaching" />
]]>
Hi,
I’m trying to add an ACF label of post automatically to the mails sent after filling in the form. Idea is to send date of event in automatic mail sent to customer (and date field is an ACF field/label named “acfdate”).
I’ve been searching online and trying some plugins but nothing works.
I also tried following steps in this topic (https://support.advancedcustomfields.com/forums/topic/connection-with-contact-form-7/) with plugin CF7 Dynamic Text Extension: https://www.ads-software.com/plugins/contact-form-7-dynamic-text-extension/) but doesn’t work either…
Thanks in advance!
Kind regards,
Steven
]]>I’m storing cookies when a CF7 form is submitted and then using CF7 Dynamic Text Extension to render the cookie in the form field. When I enabled dtx_pageload, it url-encodes the cookie, so, since it’s an email, it turns [email protected] into test%40gmail.com. Anyone know a way around this?
]]>I have a registration form that was created by the ultimate member plugin. I added some custom fields there and DTX can show me all of those fields correctly in another form that I made with CF7, except the checkbox custom field. Instead of the values of the array it makes a single checkbox with the word ‘array’.
This is how I try to retrieve my data: [dynamic_checkbox* dynamic_checkbox-509 “CF7_get_current_user key=’work_type'”]
Can someone please explain what I’m doing wrong?
WP and all the plugins that I use are up to date
]]>Hi!
This is not a support question, but a code suggestion and tip for anyone else with this issue.
I’m using Contact Form 7 – Dynamic Text Extension (v4.4.2) and have a shortcode to generate the Radio button HTML which contains an img tag, however the image was not showing as the tag was being removed.
Code snippet:
while ($loop->have_posts()) : $loop->the_post();
$product_id = $loop->post->ID;
$product = wc_get_product($product_id);
$radio_html = $radio_html . '<input type="radio" id="product_' . $product_id . '" dtx-default="" ' .
'class="wpcf7-form-control wpcf7-radio wpcf7dtx wpcf7dtx-radio" aria-invalid="false" ' .
'name="' . $badge_group . '" value="' . $product_id . '" required="required" ' . $checked .
'/><label for="product_' . $product_id . '">' .
wp_get_attachment_image($product->get_image_id(), "medium") . '</label>';
$checked = '';
endwhile;
Expected:
<span class="wpcf7-form-control-wrap my_badges" data-name="my_badges">
<input type="radio" id="product_3263" dtx-default="" class="wpcf7-form-control wpcf7-radio wpcf7dtx wpcf7dtx-radio" aria-invalid="false" name="my_badges" value="3263" required="required" checked="1">
<label for="product_3263">
<img decoding="async" src="https://example.com/wp-content/uploads/2020/11/Image-300x114.jpg"/>
</label>
</span>
Actual:
<span class="wpcf7-form-control-wrap my_badges" data-name="my_badges">
<input type="radio" id="product_3263" dtx-default="" class="wpcf7-form-control wpcf7-radio wpcf7dtx wpcf7dtx-radio" aria-invalid="false" name="my_badges" value="3263" required="required" checked="1">
<label for="product_3263">
</label>
</span>
I found that the issue was in the wpcf7dtx_shortcode_handler function that sanitizes the HTML tags and wasn’t on the list for type=radio, so I added it.
contact-form-7-dynamic-text-extension/contact-form-7-dynamic-text-extension.php
Line 519-523:
), array_merge($allowed_html, array(
'label' => array('for' => array()),
// vvv my change
'img' => array('src' => array()),
// ^^^
'input' => wpcf7dtx_get_allowed_field_properties($atts['type'])
)));
HTH
]]>Hi. We are using the plugin “CF7 to Airtable” to sync all of the form fields to Airtable. All standard Contact Form 7 fields work apart from the Dynamic Text field.
It successfully submits the form with the correct data and a copy of the submitted form is received by email. The dynamic field is shown correctly.
When it comes to mapping the fields, including the dynamic field, from Contact Form 7 to Airtable this dynamic field does not show an option for the Airtable field type. A submission of the form fails to send the Dynamic field to Airtable.
Has anyone encountered similar and knows how to send the dynamic field data?
Thanks, J
]]>i wish to retrieve a page title, similar to what i get with
[dynamictext inputname "CF7_get_post_var key='post_title'" post_id="123"]
but using a dynamic post_id, example
[dynamictext inputname “CF7_get_post_var key=’post_title'” post_id=”MY-DYNAMIC-VAR”]
i get the dynamic post_id value via query string
[CF7_GET key=’fid’]
but i can’t find the way (or maybe the correct syntiax) to use this value, or a hidden-field value, in the post_id .
anyone know if it’s possible?
thank yuo very much!
Hi there, i would like to send a hidden value in the background each time when a user sends the form.
this is how the string should look like:
[hidden gr4wp_tag_foo “foo”]
where “foo” is the value custom field “foo_tag
1.st problem: the value itself can not be found at all. actuall NO custom field value. also if i follow 1:1 the docu
[dynamictext inputname “CF7_get_custom_field key=’foo_tag'”]
2.th problem:
how can i create such a nested tag?
]]>What is the correct DTX code to use for dynamictext form fields with data from a Category’s ACF custom fields – not a post’s fields?
The form I have on an archive header only pulls in the data from the fields from the category’s first post, not the fields of the category itself. The same thing happens with CF7_get_post_var or CF7_get_custom_field
For example, at https://truetonegroup.com/willienelson, the ACF field “release” shows the album title on that category header page, as it’s supposed to. The “download” button there opens the form. The second line of the form should be what’s in the category’s “release” field, which is “The Border,” but instead is show the “release” field for the first post below it “Long Story Short …”
If there isn’t an exact code for this, what are my options in php?
Is there a way to trigger custom values from the form’s CF7 shortcode like what I added at the end?
[contact-form-7 id=”87c1bf2″ title=”Download Category” release=”The Border”]
]]>Can you tell me if you know of any way to
create a custom shortcode that can look up a page’s title from its URL
Hello,
I would like my Course title field to have the name of the previous post where the registration button is and not the title of the form page.
Thanks.
Hi, I hope you’re well.
I’m writing because I struggle with the following warning related to your plugin:
PHP Warning: ?Undefined variable $default_placeholder in /wp-content/plugins/contact-form-7-dynamic-text-extension/includes/admin.php on line 626
Could you support me with resolving this warning, please? I updated the plugin to the newest version on my website.
Regards,
]]>Hello, I have a cf7 form that consists of 4 input fields:
Is it possible to select the dropdown value and moving it to the input type text? Of course the text transmitted should work as a prefix
example: dropdown values: FRANK, MICK, NICOLE
if I select FRANK there will be a prefix as FR in the field 2, if I select MICK the prefix value would be MI
Any helps?
Ty
]]>Hello,
Many errors like these in the error_log:
Could you please fix this ?
[STDERR] PHP Warning: Undefined array key "max" in /wp-content/plugins/contact-form-7-dynamic-text-extension/contact-form-7-dynamic-text-extension.php on line 483\n
[STDERR] PHP Warning: Undefined array key "minlength" in /wp-content/plugins/contact-form-7-dynamic-text-extension/contact-form-7-dynamic-text-extension.php on line 477\n
[STDERR] PHP Warning: Undefined array key "maxlength" in /wp-content/plugins/contact-form-7-dynamic-text-extension/contact-form-7-dynamic-text-extension.php on line 469\n
[STDERR] PHP Warning: Undefined array key "maxlength" in /wp-content/plugins/contact-form-7-dynamic-text-extension/contact-form-7-dynamic-text-extension.php on line 461\n
]]>
Hello. First of all thanks a lot for the amazing plugin and job you made.
This is an example: https://www.theappliancerepairmen.com/
The “request service” form (just a form) open a modal (after clicking in BOOK ONLINE) with selection applied (or predefined) to Appliance Drop-Down menu
It is possible with your plugin? Too hard? (im not a php/ajax expert)
Many thanks in advance!!!
]]>Hi Tessa,
thank you for your job, i do really appreciate it
my question:
we use this shortcode on a cf7 form for user to ask for one or more of our programs
[dynamic_checkbox inputname use_label_element "au_dtx_demo_get_viaggi_di_gruppo_checkbox_options"]
/**
* Contact Form 7 - richiesta programma viaggio di gruppo
* Get WordPress Product Options for DTX Select Field
* Get Woo Product Options for DTX checkbox Field
* @return string JSON encoded checkbox options of key/value pairs to represent value/label pairs.
*/
function au_dtx_demo_get_viaggi_di_gruppo_checkbox_options()
{
$options = array();
$products = get_posts(array(
'fields' => 'ids',
'post_type' => 'product',
'post_status' => 'publish',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC',
'ignore_sticky_posts' => false, // move sticky posts to the start of the set
'tax_query' => array(array(
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => 'viaggi-di-gruppo',
'include_children' => true,
'operator' => 'IN'
))
));
if (is_array($products) && count($products)) {
foreach ($products as $product_id) {
$options[$product_id] = get_the_title($product_id);
}
}
return json_encode($options);
}
add_shortcode('au_dtx_demo_get_viaggi_di_gruppo_checkbox_options', 'au_dtx_demo_get_viaggi_di_gruppo_checkbox_options');
//-----------------------------------------------
it is working fine as it should, and it is correctly retrieving the titles of the products with checkboxes on the form, but in the email we receice only the ID’s of the products, but we would need the title or the SKU instead of ID.
Tried to change fields value “ids” with “names” but everything was messed up….
Can you help please?
thank you in advance for your time
Mario
Hello,
I’m trying to get a minimum range for a number field, which depends on a radio button :
– In a form to subscribe a membership, the future member chooses the payment terms
– The membership is 10€ minimum per month
– He can choose to pay more
– He can chose whether he will pay by month, three months or six month, using a radio button
– Depending on this radio button, the minimum value of the field will be 10, 30 or 60
– The placeholder is the minimum range
Can we do this with DTX ?
I use CF7DTX to dynamically retrieve data and show it to the user. However I prefer to show this within <label></label>. I could use dynamic_text in combination with ‘readonly’ and custom css class to achieve this. But I have cases where I need to retrieve 2 separate fields and display them side by side like continuous text. When I use ‘readonly’, the values are shown in 2 separate lines. Any plan to include dynamic_label in this plugin?
]]>Hi,
I encountered difficulties updating my field values, so I decided to investigate.
It seems that the configuration of radio buttons, checkboxes, and possibly other elements is opposite to the normal behavior in Contact Form 7. For example, when using options, a key|label pair is expected (e.g., DTX), but with Contact Form 7, it is the opposite: value|key. Consequently, when I try to save the values in the database through an automator, it saves the key instead.
I would appreciate any assistance you can provide.
Thank you.
]]>