<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.fdf-set-value" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>fdf_set_value</refname>
  <refpurpose>Set the value of a field</refpurpose>
 </refnamediv>
 
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>fdf_set_value</methodname>
   <methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
   <methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
   <methodparam><type>mixed</type><parameter>value</parameter></methodparam>
   <methodparam choice="opt"><type>int</type><parameter>isName</parameter></methodparam>
  </methodsynopsis>
  <para>
   Sets the <parameter>value</parameter> for the given field.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>fdf_document</parameter></term>
     <listitem>
      <para>
       The FDF document handle, returned by <function>fdf_create</function>,
       <function>fdf_open</function> or <function>fdf_open_string</function>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>fieldname</parameter></term>
     <listitem>
      <para>
       Name of the FDF field, as a string.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>value</parameter></term>
     <listitem>
      <para>
       This parameter will be stored as a string unless it is an array. In
       this case all array elements will be stored as a value array.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>isName</parameter></term>
     <listitem>
      <note>
       <para>
        In older versions of the FDF toolkit last parameter determined if the
        field value was to be converted to a PDF Name (= 1) or set to a PDF
        String (= 0).
       </para>
       <para>
        The value is no longer used in the current toolkit version 5.0. For
        compatibility reasons it is still supported as an optional parameter
        beginning with PHP 4.3, but ignored internally.
       </para>
      </note>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.success;
  </para>
 </refsect1>

 <refsect1 role="changelog">
  &reftitle.changelog;
  <para>
   <informaltable>
    <tgroup cols="2">
     <thead>
      <row>
       <entry>&Version;</entry>
       <entry>&Description;</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>4.3.0</entry>
       <entry>
        Support for arrays in the <parameter>value</parameter> parameter was
        added.
       </entry>
      </row>
     </tbody>
    </tgroup>
   </informaltable>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>fdf_get_value</function></member>
    <member><function>fdf_remove_item</function></member>
   </simplelist>
  </para>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->