Add custom option set
add_filter(‘frm_bulk_field_choices’, ‘add_custom_frm_options’); function add_custom_frm_options( $opts ){ $opts[‘Set Name’] = array(‘Option 1’, ‘Option 2’, ‘Option 3’); return $opts; }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘frm_bulk_field_choices’, ‘add_custom_frm_options’); function add_custom_frm_options( $opts ){ $opts[‘Set Name’] = array(‘Option 1’, ‘Option 2’, ‘Option 3’); return $opts; }Continue reading
add_filter(‘frm_get_categories’, ‘frm_order_cats’, 10, 2); function frm_order_cats($args, $field){ if($field[‘id’] == 25){ //change 25 to the ID of your field $args[‘parent’] = 0; } return $args; }Continue reading
add_filter(‘frm_allowed_times’, ‘change_my_business_hours’, 10, 2); function change_my_business_hours($remove, $values) { if ( $values[‘time_field’] == ‘field_mflcim’) { //change to field key for your time field $week_day = date(‘l’, strtotime($values[‘date’])); $times_to_remove = array( ‘Monday’ => array(’05:15 PM’, ’05:30 PM’, ’05:45 PM’, ’06:00 PM’), //continue…Continue reading
add_filter( ‘frm_set_comparison_type_for_lookup’, ‘customize_lookup_value_retrieval’, 10, 3); function customize_lookup_value_retrieval( $type, $parent_field, $child_field ) { if ( $parent_field->id == 123 ) { $type = ‘like’; } return $type; }Continue reading
add_filter(‘frm_show_it’, ‘custom_dynamic_list_display’, 10, 3); function custom_dynamic_list_display( $html, $value, $args ) { if ( $args[‘field’]->id == 30 ) { //change 30 to the id of the linked field ID // Customize displayed value here } return $html; }Continue reading
add_filter( ‘frm_show_it’, ‘custom_frm_show_it’, 10, 3 ); function custom_frm_show_it( $html, $value, $args ) { if ( $args[‘field’]->id == 30 ) { //change 30 to the id of the upload field in the other form $media_ids = explode( ‘, ‘, $args[‘value’] );…Continue reading
add_filter(‘frm_show_it’, ‘dynamic_list_show_option_label’, 10, 3); function dynamic_list_show_option_label( $html, $value, $args ){ if ( $args[‘field’]->id == 485 && $args[‘field’]->field_options[‘separate_value’] ) { foreach ( $args[‘field’]->options as $option ) { if ( is_array( $option ) && isset( $option[‘value’] ) && $option[‘value’] == $value )…Continue reading
add_filter(‘frm_setup_new_fields_vars’, ‘frm_set_read_only_on_create’, 9, 2); add_filter(‘frm_setup_edit_fields_vars’, ‘frm_set_read_only_on_create’, 9, 2); function frm_set_read_only_on_create( $values, $field ){ // If on the back-end, keep fields editable if ( FrmAppHelper::is_admin() || current_user_can( ‘administrator’ ) ) { return $values; } // If on front-end, make specific fields…Continue reading
add_filter(‘frm_setup_edit_fields_vars’, ‘frm_set_read_only’, 20, 3); function frm_set_read_only($values, $field, $entry_id){ // If on the back-end, keep fields editable if ( FrmAppHelper::is_admin() ) { return $values; } // If on front-end, make specific fields read-only if ( in_array( $field->id, array( 1558,554,555,556 ) )…Continue reading
add_filter(‘frm_setup_edit_fields_vars’, ‘frm_set_edit_val’, 20, 3); function frm_set_edit_val( $values, $field, $entry_id ) { if ( $field->id == 171 ) { //Replace 171 with your field ID // If on the back-end, don’t adjust field value if ( FrmAppHelper::is_admin() ) { return $values;…Continue reading