shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

How to modify Custom Form error messages

Modify ‘Required’ error messages:

The ‘Required’ error messages of the PEP custom form can be easily modified. To modify the ‘Required’ error message, there is a text field available for each form field, as illustrated in the screenshots below:

Modifying Validation Error Messages in Quoteup Custom Forms

To customize the validation error messages in Quoteup Custom Forms, you can utilize the quoteup_cf_err_messages filter. This filter allows you to modify error messages for various fields such as name, email, URL, date, number, and phone number validations.

Additionally, it can be employed to alter the generic “Validation Error” message.

Filter: quoteup_cf_err_messages

This filter is present within the quoteupCustomFormErrorMessages function located in the file form-functions.php, which is typically found in the directory product-enquiry-pro/wisdm-forms/.

Usage:

function custom_quoteup_error_messages( $error_messages ) {
    // Modify error messages as needed
    $error_messages['name'] = __( 'Please enter a valid name.', QUOTEUP_TEXT_DOMAIN );
    $error_messages['email'] = __( 'Please enter a valid email address.', QUOTEUP_TEXT_DOMAIN );
    $error_messages['url'] = __( 'Please enter a valid URL.', QUOTEUP_TEXT_DOMAIN );
    $error_messages['date'] = __( 'Please enter a valid date.', QUOTEUP_TEXT_DOMAIN );
    $error_messages['number'] = __( 'Please enter a valid number.', QUOTEUP_TEXT_DOMAIN );
    $error_messages['phone'] = __( 'Please enter a valid phone number.', QUOTEUP_TEXT_DOMAIN );
    // Modify the generic validation error message
    $error_messages['generic'] = __( 'Validation Error: Please check your input.', QUOTEUP_TEXT_DOMAIN );

    return $error_messages;
}
add_filter( 'quoteup_cf_err_messages', 'custom_quoteup_error_messages' );

Please refer to the screenshot for better understanding.

Updated on March 29, 2024
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Was this article helpful?

shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Related Articles