public function Form::updateNode in Form Builder 7.2
File
- modules/
webform/ src/ Form.php, line 153
Class
Namespace
Drupal\form_builder_webformCode
public function updateNode($node) {
$components = $this
->getComponents($node);
$first = reset($components);
if ($first['type'] == 'pagebreak') {
$node->webform['progressbar_label_first'] = $first['name'];
// Remove pagebreak if it has the right key.
if (substr($first['form_key'], 0, strlen(self::LABEL_PREFIX)) === self::LABEL_PREFIX) {
unset($components[$first['cid']]);
foreach ($components as &$c) {
$c['page_num']--;
}
}
}
$node->webform['components'] = $components;
}