Move description for checkbox/radio field

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

Populate with uploaded image path

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

Set the default value of a dropdown

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

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

Remove “View more” link

add_filter( ‘frm_export_content’, ‘change_exported_cell’ ); function change_exported_cell( $content ) { $content = str_replace( ‘View more’, ‘ ‘, $content ); return $content; }Continue reading