Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Adds a value to a choice field.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.AddValToChoiceField"; PDF; Field; ExpValue; Value { ; Selected } )   More


Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
Field The field index or field name. "FirstName"
ExpValue Export value (can be empty) ""
Value Visible choice value (required). "Hello"
Selected Whether this value should be selected. 1 to select and 0 to not select. 0 Optional


Returns OK or error.


Adds a value to a choice field.
The parameter Field must be a handle of a combo box or list box. The parameter ExpValue defines the export value that will be submitted to a web server if the value is selected in Adobe's Acrobat. The export value can be an empty string and it is possible to use one export value for multiple values.

The parameter Value is the visible text that can be selected inside the combo box or list box. Value must be a unique string inside the combo box or list box values. Value is required; it must not be an empty string.

If the parameter Selected is true the value appears as selected value in Adobe's Acrobat. List boxes support multiple selected values depending on whether the flag ffMultiSelect was set or not (see DynaPDF.SetFieldFlags and DynaPDF.CreateListBox for further information). If the flag ffMultiSelect is not set, a selected value disables all others (default).

See also AddValToChoiceField function in DynaPDF manual.

See also

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 9th July 2015

DynaPDF.AddOutputIntentEx - DynaPDF.AllowPageBreak