Code Duplication    Length = 14-14 lines in 2 locations

classes/fields/pick.php 2 locations

@@ 775-788 (lines=14) @@
772
	    $format_type = pods_v( self::$type . '_format_type', $options, 'single' );
773
774
        if ( 'single' == $format_type ) {
775
            if ( 'dropdown' == pods_var( self::$type . '_format_single', $options, 'dropdown' ) )
776
                $field_type = 'select';
777
            elseif ( 'radio' == pods_var( self::$type . '_format_single', $options, 'dropdown' ) )
778
                $field_type = 'radio';
779
            elseif ( 'autocomplete' == pods_var( self::$type . '_format_single', $options, 'dropdown' ) )
780
                $field_type = 'select2';
781
            elseif ( 'flexible' == pods_var( self::$type . '_format_single', $options, 'dropdown' ) )
782
                $field_type = 'flexible';
783
            else {
784
                // Support custom integration
785
                do_action( 'pods_form_ui_field_pick_input_' . pods_var( self::$type . '_format_type', $options, 'single' ) . '_' . pods_var( self::$type . '_format_single', $options, 'dropdown' ), $name, $value, $options, $pod, $id );
786
                do_action( 'pods_form_ui_field_pick_input', pods_var( self::$type . '_format_type', $options, 'single' ), $name, $value, $options, $pod, $id );
787
                return;
788
            }
789
        }
790
        elseif ( 'multi' == $format_type ) {
791
            if ( !empty( $value ) && !is_array( $value ) )
@@ 794-807 (lines=14) @@
791
            if ( !empty( $value ) && !is_array( $value ) )
792
                $value = explode( ',', $value );
793
794
            if ( 'checkbox' == pods_var( self::$type . '_format_multi', $options, 'checkbox' ) )
795
                $field_type = 'checkbox';
796
            elseif ( 'multiselect' == pods_var( self::$type . '_format_multi', $options, 'checkbox' ) )
797
                $field_type = 'select';
798
            elseif ( 'autocomplete' == pods_var( self::$type . '_format_multi', $options, 'checkbox' ) )
799
                $field_type = 'select2';
800
            elseif ( 'flexible' == pods_var( self::$type . '_format_multi', $options, 'checkbox' ) )
801
                $field_type = 'flexible';
802
            else {
803
                // Support custom integration
804
                do_action( 'pods_form_ui_field_pick_input_' . pods_var( self::$type . '_format_type', $options, 'single' ) . '_' . pods_var( self::$type . '_format_multi', $options, 'checkbox' ), $name, $value, $options, $pod, $id );
805
                do_action( 'pods_form_ui_field_pick_input', pods_var( self::$type . '_format_type', $options, 'single' ), $name, $value, $options, $pod, $id );
806
                return;
807
            }
808
        }
809
        else {
810
            // Support custom integration