h1lbert
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7 - Dynamic Text Extension] Dynamic select with E-mail inputcan you try like this, i’m quite sure it will select the correct value when you use the visible text: https://www.domain.com/contact?EmailAddress=Support#form
you can also try to use the index of the select:
https://www.domain.com/contact?EmailAddress=1#form
https://www.domain.com/contact?EmailAddress=2#form
https://www.domain.com/contact?EmailAddress=3#form
[dynamic_select* your-subject default:CF7_GET%20key%3D%26%2339%3BEmailAddress%26%2339%3B "[email protected] | General requiry" "[email protected] | Support" "[email protected] | Project" "[email protected] | Technology"]the field has name: your-subject, so you should be able to use this in your recipient field.
you can see a working example here: https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-shortcode-php-get-variables/?foo=bar&hello=world
it will populate 2 field: foo and Hello, with text: bar and world.
Forum: Plugins
In reply to: [Contact Form 7 - Dynamic Text Extension] Dynamic select with E-mail inputYour URL should be: https://www.domain.com/contact#form[email protected]
then you can read the emailaddress like this:
[dynamic_select* your-subject default:"CF7_GET key='EmailAddress'" "[email protected] | General requiry" "[email protected] | Support" "[email protected] | Project" "[email protected] | Technology"]but you need to encode it to this:
[dynamic_select* your-subject default:CF7_GET%20key%3D%26%2339%3BEmailAddress%26%2339%3B "[email protected] | General requiry" "[email protected] | Support" "[email protected] | Project" "[email protected] | Technology"]Contact form 7 can load the current URL into the mail by using:
[_url]
see: https://contactform7.com/special-mail-tags/then you have a direct link to your product. Might that be a good solution?
(then you need to display the contact form in your product page, instead of a button to the form)
- This reply was modified 11 months, 2 weeks ago by h1lbert.
I found the problem why the labels are below the radio button, instead of to the right of it, and why the border is missing around the group of radiobuttons. There is a difference between default CF7 radio button and DTX: there is an extra SPAN to create the border around the buttons. The class “wpcf7-form-control wpcf7-radio” is added to the extra SPAN. in DTX the class is assigned to the Input, but you have multiple inputs in a set of radio buttons. with Radiobuttons, this class should go to the SPAN, not the Input itself.

I can fix this by changing line 320 in utilities.php, add an if statement to exclude this part of the code when it is a radio button:
if ($type != 'radio') {
$values = explode(' ', wpcf7_form_controls_class($type));
$values[] = 'wpcf7dtx';
$values[] = sanitize_html_class('wpcf7dtx-' . $type);
}
now the class is no longer assigned to the input when it is a radio button.
then adapt: line 610 in contact-form-7-dynamic-text-extension.php to add the extra SPAN in a Radiobutton group with the correct class: “wpcf7-form-control wpcf7-radio”str_replace('%2$s%3$s','<span class="wpcf7-form-control wpcf7-radio">%2$s%3$s</span>',str_replace('<span class=', '<span%4$s class=', $wrapper)),Now it works as expected. Can you consider this or similar solution for next version?
thanks!
On line 590 in Utilities.php, the Label is evaluated if it is empty or not:
if (!empty(trim($label_text))) {but !empty will evaluate as false for 0 (zero)
changing code to:
if ((!empty(trim($label_text)))||($label_text == "0")) {fixes my problem. Can you see if you can implement this or a simular solution for the missing 0 label?
thanks a lot!
- This reply was modified 1 year ago by h1lbert.
is there a link with this item?
https://ww.wp.xz.cn/support/topic/error-with-option-value-0-for-a-dynamic-radio-button/
i found it in the change log.
Forum: Plugins
In reply to: [Contact Form 7] Message in one row, without line breaksi have the same problem with 7.5.3
the <br> tag is missing in the HTML mail, in all emails from CF7.