public function populate($data)
	{
		// Loop through all the elements assigned and attempt to assign a value to them.
		foreach ( $this->getContents() as $item )
		{
			if ($item instanceof InputContainer)
			{
				// This is another Fieldset or Form so needs to be populated too
				$item->populate($data);
			}
			// This is a regular input so it can be populated
			else
			{
				// Convert the name to a dot notation for better searching
				$key = $this->inputNameToKey($item->getName());
				$value = Arr::get($data, $key);

				if ( !is_null($value) )
				{
					$item->setValue($value);
				}
			}
		}

		return $this;
	}
public function populate($data)
	{
		// Loop through all the elements assigned and attempt to assign a value to them.
		foreach ( $this->getContents() as $item )
		{
			if ($item instanceof InputContainer)
			{
				// This is another Fieldset or Form so needs to be populated too
				$item->populate($data);
			}
			// This is a regular input so it can be populated
			else
			{
				// Convert the name to a dot notation for better searching
				$key = $this->inputNameToKey($item->getName());
				$value = Arr::get($data, $key);

				if ( !is_null($value) )
				{
					$item->setValue($value);
				}
			}
		}

		return $this;
	}
public function populate ( $ data ) { // Loop through all the elements assigned and attempt to assign a value to them. foreach ( $ this -> getContents ( ) as $ item ) { if ( $ item instanceof InputContainer ) { // This is another Fieldset or Form so needs to be populated too $ item -> populate ( $ data ) ; } // This is a regular input so it can be populated else { // Convert the name to a dot notation for better searching $ key = $ this -> inputNameToKey ( $ item -> getName ( ) ) ; $ value = Arr :: get ( $ data , $ key ) ; if ( ! is_null ( $ value ) ) { $ item -> setValue ( $ value ) ; } } } return $ this ; }
Populates the fields using the array passed.

@param array $data The data to use for population.

@return \Fuel\Fieldset\InputContainer

@since 2.0
Populates the fields using the array passed .