We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09363d5 commit 404232bCopy full SHA for 404232b
inc/form.class.php
@@ -1541,8 +1541,16 @@ public function duplicate() {
1541
if ($new_form_id === false) {
1542
return false;
1543
}
1544
+ $newForm = new self();
1545
+ $newForm->getFromDB($new_form_id);
1546
+ $newName = $newForm->fields['name'] . ' [' . __('Duplicate', 'formcreator') . ']';
1547
+ $newForm->update([
1548
+ 'id' => $new_form_id,
1549
+ 'name' => Toolbox::addslashes_deep($newName),
1550
+ ]);
1551
$linker->linkPostponed();
1552
1553
+
1554
return $new_form_id;
1555
1556
0 commit comments