classes/PodsForm.php
public static function value( $type, $value = null, $name = null, $options = null, $pod = null, $id = null, $traverse = null ) {

		self::field_loader( $type );

		if ( in_array( $type, self::repeatable_field_types() ) && 1 == pods_v( $type . '_repeatable', $options, 0 ) && ! is_array( $value ) ) {
			if ( 0 < strlen( $value ) ) {
				$simple = @json_decode( $value, true );

				if ( is_array( $simple ) ) {
					$value = $simple;
				} else {
					$value = (array) $value;
				}
			} else {
				$value = array();
			}
		}

		if ( is_array( $value ) && in_array( $type, self::tableless_field_types(), true ) ) {
			foreach ( $value as &$display_value ) {
				$display_value = call_user_func( array(
					self::$loaded[ $type ],
					'value',
				), $display_value, $name, $options, $pod, $id, $traverse );
			}
		} else {
			$value = call_user_func( array(
				self::$loaded[ $type ],
				'value',
			), $value, $name, $options, $pod, $id, $traverse );
		}//end if

		return $value;
	}
public static function value( $type, $value = null, $name = null, $options = null, $pod = null, $id = null, $traverse = null ) {

		self::field_loader( $type );

		if ( in_array( $type, self::repeatable_field_types() ) && 1 == pods_v( $type . '_repeatable', $options, 0 ) && ! is_array( $value ) ) {
			if ( 0 < strlen( $value ) ) {
				$simple = @json_decode( $value, true );

				if ( is_array( $simple ) ) {
					$value = $simple;
				} else {
					$value = (array) $value;
				}
			} else {
				$value = array();
			}
		}

		if ( is_array( $value ) && in_array( $type, self::tableless_field_types(), true ) ) {
			foreach ( $value as &$display_value ) {
				$display_value = call_user_func( array(
					self::$loaded[ $type ],
					'value',
				), $display_value, $name, $options, $pod, $id, $traverse );
			}
		} else {
			$value = call_user_func( array(
				self::$loaded[ $type ],
				'value',
			), $value, $name, $options, $pod, $id, $traverse );
		}//end if

		return $value;
	}
public static function value ( $ type , $ value = null , $ name = null , $ options = null , $ pod = null , $ id = null , $ traverse = null ) { self :: field_loader ( $ type ) ; if ( in_array ( $ type , self :: repeatable_field_types ( ) ) && 1 == pods_v ( $ type . '_repeatable' , $ options , 0 ) && ! is_array ( $ value ) ) { if ( 0 < strlen ( $ value ) ) { $ simple = @ json_decode ( $ value , true ) ; if ( is_array ( $ simple ) ) { $ value = $ simple ; } else { $ value = ( array ) $ value ; } } else { $ value = array ( ) ; } } if ( is_array ( $ value ) && in_array ( $ type , self :: tableless_field_types ( ) , true ) ) { foreach ( $ value as & $ display_value ) { $ display_value = call_user_func ( array ( self :: $ loaded [ $ type ] , 'value' , ) , $ display_value , $ name , $ options , $ pod , $ id , $ traverse ) ; } } else { $ value = call_user_func ( array ( self :: $ loaded [ $ type ] , 'value' , ) , $ value , $ name , $ options , $ pod , $ id , $ traverse ) ; } //end if return $ value ; }
Change the value of the field

@param        $type
@param mixed  $value
@param string $name
@param array  $options
@param array  $pod
@param int    $id
@param array  $traverse

@return array|mixed|null|object
@internal param array $fields
@since 2.3.0
Change the value of the field