Petr
Forum Replies Created
-
@pedro-magnifico It that way, do you use a “throw-away” email in the To field? Without an email value in the To: my form will not validate.
I’m just dealing with an issue I can’t fathom. The solution worked, as described above, without a hitch for a few days. Now something has changed (probably) and I can’t get the value through.
I have further plugged in the shortcode inside a custom post and was getting the email from the page.
Now when I try I get blank input field. Perhaps someone can see, what’s going wrong
$artist_email = gdlr_get_portfolio_info(array('artist-email'), $gdlr_post_option, false); echo do_shortcode( '[contact-form-7 id="16" title="Artist Booking Form - do not delete" artist-email=" '. $artist_email .' "]' );
When I simply echo the variable $artist_email I can see it no problem. I can even see the first character if I do:
echo do_shortcode( '[contact-form-7 id="16" title="Artist Booking Form - do not delete" artist-email=" '. $artist_email[0] .' "]' );
But not the complete address. What gives?
Okay, I have managed to find an acceptable solution. It revolves around the ability to pull info from custom meta (and other fields) on the page. CF7 details the method in Getting Default Values from Shortcode Attributes post.
Slight downside is the fact that you need to use email* type for the key value. Otherwise the validation process is going to complain. Also, the field cannot be hidden from the front end, so we have to use css to stop it from displaying. The downside is that it is still the page code and available for scrapers to harvest it. Perhaps some obfuscating techniques could hide it altogether from bots.
Forum: Plugins
In reply to: [Contact Form 7] DynamicText > email not workingI seem to be halving similar issue. Any pointers how you’ve resolved it?
Same problem here. CF7 help suggest that the value going to “TO:” field should be “required”, so there is always a recipient to the email. But the dynamichidden doesn’t work with “*” (required mark) and the shortcode renders as plain text on the front end. Notwithstanding, the email validation still highlights the key as incorrect.
I have found another (non-working method) ?? It would appear that CF7 can pickup value from custom fields without another plugin, as see for details. And whilst I can see the value being pulled into the front end, the form complains and email will not send.
Have you been able to resolve it?