lib/PHPRtfLite/FormField.php
public function render()
    {
        $stream = $this->_rtf->getWriter();

        $stream->write(' ');
        if ($this->_font) {
            $stream->write('{' . $this->_font->getContent());
        }

        $defaultValue = PHPRtfLite_Utf8::getUnicodeEntities($this->_defaultValue, $this->_rtf->getCharset());
        $content = '{\field'
            . '{\*\fldinst ' . $this->getType()
            . '  {\*\formfield' . $this->getRtfCode() . '}'
            . '}{\fldrslt ' . $defaultValue . '}}';

        $stream->write($content);

        if ($this->_font) {
            $stream->write($this->_font->getClosingContent() . '}');
        }
        $stream->write(' ');
    }
public function render()
    {
        $stream = $this->_rtf->getWriter();

        $stream->write(' ');
        if ($this->_font) {
            $stream->write('{' . $this->_font->getContent());
        }

        $defaultValue = PHPRtfLite_Utf8::getUnicodeEntities($this->_defaultValue, $this->_rtf->getCharset());
        $content = '{\field'
            . '{\*\fldinst ' . $this->getType()
            . '  {\*\formfield' . $this->getRtfCode() . '}'
            . '}{\fldrslt ' . $defaultValue . '}}';

        $stream->write($content);

        if ($this->_font) {
            $stream->write($this->_font->getClosingContent() . '}');
        }
        $stream->write(' ');
    }
public function render ( ) { $ stream = $ this -> _rtf -> getWriter ( ) ; $ stream -> write ( ' ' ) ; if ( $ this -> _font ) { $ stream -> write ( '{' . $ this -> _font -> getContent ( ) ) ; } $ defaultValue = PHPRtfLite_Utf8 :: getUnicodeEntities ( $ this -> _defaultValue , $ this -> _rtf -> getCharset ( ) ) ; $ content = '{\field' . '{\*\fldinst ' . $ this -> getType ( ) . '  {\*\formfield' . $ this -> getRtfCode ( ) . '}' . '}{\fldrslt ' . $ defaultValue . '}}' ; $ stream -> write ( $ content ) ; if ( $ this -> _font ) { $ stream -> write ( $ this -> _font -> getClosingContent ( ) . '}' ) ; } $ stream -> write ( ' ' ) ; }
renders form field
renders form field