vipingarg
Forum Replies Created
-
@sevenspark
I didn’t get your point.I have used contact form 7- 4.0.3 with Dynamic extension 1.2.
These were working fine.
But After the update of both, They give errors.
==============================================================
Now Again I have downgraded the both plugins, It works fine for HTML templates.
But no response message is displaying.
==============================================================The updated version of Dynamic text extension is not working good with updated cf7.
They didn’t convert [dynamic-text] short code’s HTML content to visual text.
That’s the issue.@sevenspark Before WordPress update, it was working fine and was converts all HTML tags to text. Now a hyperlinked text is displayed with the HTML tags in the mail.
Forum: Plugins
In reply to: [Contact Form 7] How to avoid URLs & code in text area?Solution:
function custom_textarea_validation_filter($result, $tag) {
$type = $tag[‘type’];
$name = $tag[‘name’];
//here textarea type name is ‘message’
if($name == ‘your-message’) {
$value = $_POST[$name];
if (preg_match(‘/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i’, $value)){
$result->invalidate( $tag, “Avoid URLs & Links” );
}
}
return $result;
}
add_filter(‘wpcf7_validate_textarea’,’custom_textarea_validation_filter’, 10, 2);
add_filter(‘wpcf7_validate_textarea*’, ‘custom_textarea_validation_filter’, 10, 2);