Change the incorrect field message
add_filter( ‘frm_global_invalid_msg’, ‘change_message’ ); function change_message( $message ) { $message = ‘place new message here’; return $message; }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_global_invalid_msg’, ‘change_message’ ); function change_message( $message ) { $message = ‘place new message here’; return $message; }Continue reading
add_filter(‘frm_update_entry_meta’, ‘update_field_value’); function update_field_value($new_values) { if ($new_values[‘field_id’] == 11389) { //11389 is the ID of the hidden field in the form – note that this field must have a value in it on form submit or this code will not…Continue reading
add_filter( ‘frm_add_form_style_class’, ‘frm_add_style_attribute_to_form_shortcode’, 1 ); function frm_add_style_attribute_to_form_shortcode( $class ) { if ( ! isset( $_GET[‘use_style’] ) ) { return $class; } $new_style = $_GET[‘use_style’]; $new_style = utf8_decode( urldecode( $new_style ) ); $new_style = esc_html( $new_style ); remove_filter( ‘frm_add_form_style_class’, ‘FrmStylesController::get_form_style_class’, 10,…Continue reading
add_filter( ‘frm_quiz_score_field’, ‘exclude_date_field_type’, 10, 2 ); function exclude_date_field_type( $count_field, $args ) { if ( $args[‘field’]->type === ‘date’ ) { $count_field = false; } return $count_field; }Continue reading
add_filter(‘frm_validate_field_entry’, ‘set_custom_repeating_val’, 10, 4); function set_custom_repeating_val($errors, $posted_field, $posted_value, $args){ if ( $posted_field->id == 5847 ) {// Please replace 5847 with the ID of your repeater field $field_to_change = 5846 ; // change 5846 to the ID of the field that…Continue reading
add_action( ‘frm_display_form_action’, ‘ff_enforce_single_daily_entry’, 8, 3 ); function ff_enforce_single_daily_entry( $params, $fields, $form ) { global $user_ID; remove_filter( ‘frm_continue_to_new’, ‘__return_false’, 50 ); if ( ‘123’ === $form->id && ! is_admin() ) { //replace 123 with the id of the form you are…Continue reading
add_filter(‘frm_custom_html’, ‘frm_move_field_description’, 20, 2); function frm_move_field_description( $default_html, $field_type ) { $start_description = ‘[if description]’; $end_description = ‘[/if description]’; $description_start_pos = strpos( $default_html, $start_description ); $description_end_pos = strpos( $default_html, $end_description ); if ( $description_start_pos === false || $description_end_pos === false )…Continue reading
add_filter( ‘frm_filtered_lookup_options’, ‘change_lookup_options’, 10, 2 ); function change_lookup_options( $options, $args ) { if ( $args[‘field’]->id === ’25’ ) { // change 25 to the id of the field in the other form foreach ( $options as $k => $option )…Continue reading
add_filter( ‘frm_get_default_value’, ‘my_custom_default_value’, 10, 3 ); function my_custom_default_value( $new_value, $field, $is_default ) { if ( $field->type === ‘select’ && $field->id == ’25’ && $is_default ) { //change 25 to the ID of the field $default_value = array( ‘label’ => ‘Custom…Continue reading
add_filter( ‘frm_export_content’, ‘replace_ampersand’ ); function replace_ampersand( $content ) { $content = str_replace( ‘amp;’, ‘ ‘, $content ); return $content; }Continue reading