I need to programmatically fill PDF forms with data retrieved from a database using the CORE API SDK. So far I can successfully fill all field types that I have needed to except the FFT_ComboBox field type.
Example code for FFT_RadioButton type is as follows and works fine:
Code: Select all
// Cycle through widgets
for (uint i = 0; i < currentField.WidgetsCount; i++)
{
// Retrieve widget
IPXC_Annotation widget = currentField.Widget[i];
// Comapare with data value
if (widget.OnValue == item.Data)
{
// Set as active
currentField.CheckWidget(i, true);
break;
}
}
Code: Select all
string comboValue = string.Empty;
string comboLabel = string.Empty;
bool comboSelected = false;
// Loop through options
for (uint i = 0; i < currentField.OptCount; i++)
{
// Retrieve option
currentField.GetOpt(i, out comboValue, out comboLabel, out comboSelected);
// Comapare with data value
if (comboValue == item.Data)
{
// Set as selected
//currentField.SelectItem(i, true, true); //Does not work
break;
}
}