public function offsetSet($offset, $value)
    {
        if (!($value instanceof FormField))
            throw new InvalidArgumentException("Value must be a FormField");

        $this->form_elements[$offset] = $value; 
    }
public function offsetSet($offset, $value)
    {
        if (!($value instanceof FormField))
            throw new InvalidArgumentException("Value must be a FormField");

        $this->form_elements[$offset] = $value; 
    }
public function offsetSet ( $ offset , $ value ) { if ( ! ( $ value instanceof FormField ) ) throw new InvalidArgumentException ( "Value must be a FormField" ) ; $ this -> form_elements [ $ offset ] = $ value ; }
Add or replace a form element
@param string $offset The name of the element
@param FormElement $element The element to set
Add or replace a form element