toothless
(Toothless Dragon)
May 29, 2025, 6:20am
2
Hi there,
You can follow my solution provided on another ticket below.
Hi Shaun,
Yes, the provided code is still effective in blocking website URLs from the paragraph field.
[Error message@2x]
add_filter( 'gform_field_validation_1_74', 'validate_input_1_74', 10, 4 );
function validate_input_1_74( $result, $value, $form, $field ) {
$nourl_pattern = '(http|https)';
if ( preg_match( $nourl_pattern, $value ) ) {
$result['is_valid'] = false;
$result['message'] = 'Message can not contain website addresses.';
}
return $result;
}
Have you had a chance to t…
or
Hi Shaun,
We can use jQuery code to hide the submit button if the paragraph field contains any URL. However, it might not work smoothly, so you may see the button while typing.
I recommend using the first option, but if you prefer, you can use the following code as well. It only performs front-end validation, not server-side validation.
jQuery(document).ready(function($) {
// Function to check the text and update button visibility
function updateButtonVisibility() {
var messag…
You can also suggest this feature directly to the product management team for consideration when planning future releases on the Gravity Forms product roadmap page.