function createDestinationServerInputGroup($value = null)
{
    $group = new Form_Group('Destination server');
    $group->add(new Form_IpAddress('server', 'Destination server', $value))->setWidth(4)->setHelp('This is the IPv6 address of the server to which DHCPv6 requests are relayed.')->setIsRepeated();
    $group->enableDuplication(null, true);
    // Buttons are in-line with the input
    return $group;
}
$form = new Form(new Form_Button('Submit', gettext("Save")));
$section = new Form_Section('QinQ Configuration');
$section->addInput(new Form_Select('if', 'Parent interface', $pconfig['if'], build_parent_list()))->setHelp('Only QinQ capable interfaces will be shown.');
$section->addInput(new Form_Input('tag', 'First level tag', 'number', $pconfig['tag'], ['max' => '4094', 'min' => '1']))->setHelp('This is the first level VLAN tag. On top of this are stacked the member VLANs defined below.');
$section->addInput(new Form_Checkbox('autogroup', 'Option(s)', 'Adds interface to QinQ interface groups', $pconfig['autogroup']))->setHelp('Allows rules to be written more easily');
$section->addInput(new Form_Input('descr', 'Description', 'text', $pconfig['descr']))->setHelp('You may enter a description here for your reference (not parsed).');
$section->addInput(new Form_StaticText('Member(s)', 'You can specify ranges in the inputs below. Enter a range (2-3) or individual numbers.' . '<br />' . 'Click "Duplicate" as many times as needed to add new inputs'));
if (isset($id) && $a_qinqs[$id]) {
    $section->addInput(new Form_Input('id', null, 'hidden', $id));
}
$counter = 0;
$members = $pconfig['members'];
// List each of the member tags from the space-separated list
if ($members != "") {
    $item = explode(" ", $members);
} else {
    $item = array('');
}
foreach ($item as $ww) {
    $member = $item[$counter];
    $group = new Form_Group($counter == 0 ? 'Tag(s)' : '');
    $group->add(new Form_Input('members', null, 'text', $ww))->setWidth(6);
    // Width must be <= 8 to make room for the duplication buttons
    $counter++;
    $group->enableDuplication(null, true);
    // Buttons are in-line with the input
    $section->add($group);
}
$form->add($section);
print $form;
include "foot.inc";