add_filter(‘charitable_validate_donation_form_submission_email_check’, ‘charitable_test_for_email’, 10, 2 ); function charitable_test_for_email( $valid, $submitted ) { $email = $submitted->get_submitted_value( ’email’ ); // Add your logic here to see if the email is valid or not. // Return false if not valid, otherwise let the validation…Continue reading
/* * Hide Elementor image optimization ads when choosing the post’s featured image on the backend * UPDATE: 20/06/24 Hide Elementor image optimization ads on Media Library, if closing the “x” is not enough. */ function hide_elementor_nag_admin() { ?>Continue reading
/** * Add autocomplete setting to form fields. */ add_action( ‘elementor/element/form/section_form_fields/before_section_end’, function( \Elementor\Widget_Base $widget ) { $elementor = \ElementorPro\Plugin::elementor(); $control_data = $elementor->controls_manager->get_control_from_stack( $widget->get_unique_name(), ‘form_fields’ ); if( is_wp_error( $control_data ) ) { return; } $control_data[‘fields’] = $control_data[‘fields’] + [ ‘namespace_autocomplete’ =>…Continue reading
/** * Custom shortcode to display the total number of entries for a form. * * Basic usage: [wpf_entries_count id=”FORMID” type=”TYPE”] * * Realtime counts could be delayed due to any caching setup on the site * * @link https://wpforms.com/developers/how-to-display-the-total-number-of-entries/…Continue reading
/** * Add additional formats for the Time field Format dropdown using French time format. * * @link https://wpforms.com/developers/how-to-create-additional-formats-for-the-date-time-field-time-picker/ */ function wpf_dev_date_field_time_formats_french( $time_formats ) { $time_formats[ ‘G\\\hi\\\m’ ] = ‘French Format’; return $time_formats; } add_filter( ‘wpforms_datetime_time_formats’, ‘wpf_dev_date_field_time_formats_french’, 10, 1 );Continue reading
/** * Add additional formats for the Time field Format dropdown. * * @link https://wpforms.com/developers/how-to-create-additional-formats-for-the-date-time-field-time-picker/ */ function wpf_dev_date_field_time_formats1 ( $time_formats ) { // Displays 2-digit hour, 2-digit minute, and 2-digit seconds $time_formats[ ‘H:i:s’ ] = ‘HH:MM:SS’; return $time_formats; } add_filter(…Continue reading
/** * Customize email field properties. * * @link https://wpforms.com/developers/how-to-change-sublabels-for-the-email-field/ */ function wpf_dev_email_field_properties( $properties, $field, $form_data ) { // Only process this snippet on the form ID 123 if ( absint( $form_data[ ‘id’ ] ) !== 123 ) { return…Continue reading
/** * Customize email field properties. * * @link https://wpforms.com/developers/how-to-change-sublabels-for-the-email-field/ */ function wpf_dev_email_field_properties( $properties, $field, $form_data ) { // Change sublabel values $properties[ ‘inputs’ ][ ‘primary’ ][ ‘sublabel’ ][ ‘value’ ] = __( ‘Enter Your Email’, ‘plugin-domain’ ); $properties[ ‘inputs’…Continue reading
/* WCV – Require auction start price and auction dates */ function wcv_make_field_required( $field ) { $field[‘custom_attributes’][‘required’] = ‘required’; $field[‘custom_attributes’][‘data-parsley-required-message’] = __( ‘This field is required.’, ‘wc-vendors’ ); return $field; } add_filter( ‘wcv_simple_auctions_end_date’, ‘wcv_make_field_required’ ); add_filter( ‘wcv_simple_auctions_start_date’, ‘wcv_make_field_required’ ); add_filter(…Continue reading