Code Duplication    Length = 14-14 lines in 2 locations

classes/fields/pick.php 2 locations

@@ 866-879 (lines=14) @@
863
	    $format_type = pods_v( self::$type . '_format_type', $options, 'single' );
864
865
        if ( 'single' == $format_type ) {
866
            if ( 'dropdown' == pods_var( self::$type . '_format_single', $options, 'dropdown' ) ) {
867
	            $options[ 'view_name' ] = 'select';
868
            } elseif ( 'radio' == pods_var( self::$type . '_format_single', $options, 'dropdown' ) ) {
869
	            $options[ 'view_name' ] = 'radio';
870
            } elseif ( 'autocomplete' == pods_var( self::$type . '_format_single', $options, 'dropdown' ) ) {
871
	            $options[ 'view_name' ] = 'select2';
872
            } elseif ( 'flexible' == pods_var( self::$type . '_format_single', $options, 'dropdown' ) ) {
873
	            $options[ 'view_name' ] = 'flexible';
874
            } else {
875
                // Support custom integration
876
                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 );
877
                do_action( 'pods_form_ui_field_pick_input', pods_var( self::$type . '_format_type', $options, 'single' ), $name, $value, $options, $pod, $id );
878
                return;
879
            }
880
        }
881
        elseif ( 'multi' == $format_type ) {
882
            if ( !empty( $value ) && !is_array( $value ) ) {
@@ 886-899 (lines=14) @@
883
	            $value = explode( ',', $value );
884
            }
885
886
            if ( 'checkbox' == pods_var( self::$type . '_format_multi', $options, 'checkbox' ) ) {
887
	            $options[ 'view_name' ] = 'checkbox';
888
            } elseif ( 'multiselect' == pods_var( self::$type . '_format_multi', $options, 'checkbox' ) ) {
889
	            $options[ 'view_name' ] = 'select';
890
            } elseif ( 'autocomplete' == pods_var( self::$type . '_format_multi', $options, 'checkbox' ) ) {
891
	            $options[ 'view_name' ] = 'select2';
892
            } elseif ( 'flexible' == pods_var( self::$type . '_format_multi', $options, 'checkbox' ) ) {
893
	            $options[ 'view_name' ] = 'flexible';
894
            } else {
895
                // Support custom integration
896
                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 );
897
                do_action( 'pods_form_ui_field_pick_input', pods_var( self::$type . '_format_type', $options, 'single' ), $name, $value, $options, $pod, $id );
898
                return;
899
            }
900
        }
901
        else {
902
            // Support custom integration