Change field name

add_filter( ‘rest_prepare_frm_fields’, ‘change_field_name’, 10, 3 ); function change_field_name( $response, $field, $request ) { if ( isset( $response->data[‘name’] ) ) { $response->data[‘name’] = ‘place here the new name of the field’; } return $response; }Continue reading

Change form name

add_filter( ‘rest_prepare_frm_forms’, ‘change_form_name’, 10, 3 ); function change_form_name( $response, $form, $request ) { if ( isset( $response->data[‘name’] ) ) { $response->data[‘name’] = ‘place here the new name of the form’; } return $response; }Continue reading

Change a message in the global setting

add_filter( ‘frm_global_setting’, ‘replace_global_setting’, 10, 3 ); function replace_global_setting( $setting, $string, $settings ) { $form_id = $settings->current_form; if ( $form_id === 5 && $string === ‘login_msg’ ) { // change 5 to your form id and login&msg to the string name.…Continue reading

Count number of edits

add_filter( ‘frm_setup_edit_fields_vars’, ‘frm_edit_counter’, 20, 4 ); function frm_edit_counter( $values, $field, $entry_id ) { if ( intval( $field->id ) === 12283 && ! FrmAppHelper::is_admin() ) { //Replace 12283 with your field ID $values[‘value’] = intval( $values[‘value’] ) + 1; } return…Continue reading

Set Style in form shortcode

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

Exclude date field type

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

Calculate total time inside a repeater

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

Modify time

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