如何将ValidForm Builder表单字段数组()保留为数组

I discovered a problem in that ValidForm Builder seems to not be able to retain a form field as an array and converts it into a string.

Here is the code:

$objList = $objGroup->addField('listID', 'List', VFORM_CHECK_LIST,
  array('required' => true),
  array('required' => 'List is required'),
  array('default' => $default['listID'])
);
$objList->addField('Red', 'R');
$objList->addField('Green', 'G');
$objList->addField('Blue', 'B');

if ($objForm->isSubmitted() && $objForm->isValid()) {
  //$GLOBALS['listID'] = $objForm->getValidField('listID')->getValue(); // VFB does not properly capture as an array
  $GLOBALS['listID'] = $_POST['listID']; // use this workaround
}

If the Red and Blue checkboxes are checked, then: _POST['listID'] is

{
  [0] => "R"
  [1] => "B"
}

But, after $objForm->getValidField('listID')->getValue() is processed, GLOBALS['listID'] is a string value of "R"

$GLOBALS['listID'] should contain the same thing as _POST['listID']

When I install the latest version of this php form builder and execute your example, I get the expected output: an array of values.

You should probably update your library to the latest version since the developers have apparently fixed this bug as far as it ever was one.