Skip to content

Commit

Permalink
Form Builder - When cloning a form, assign it to a new path
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Jan 21, 2025
1 parent b1e38c3 commit d249a99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ext/afform/admin/Civi/Api4/Action/Afform/LoadAdminData.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public function _run(\Civi\Api4\Generic\Result $result) {
if (!$newForm) {
// Load existing afform if name provided
$info['definition'] = $this->loadForm($this->definition['name']);
if (!empty($info['definition']['server_route'])) {
$info['definition']['server_route'] = $this->createDefaultRoute($info['definition']['type']);
}
}
else {
// Create new blank afform
Expand Down
1 change: 0 additions & 1 deletion ext/afform/admin/ang/afGuiEditor/afGuiEditor.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
}
if (editor.mode === 'clone') {
delete editor.afform.name;
delete editor.afform.server_route;
delete editor.afform.navigation;
editor.afform.title += ' ' + ts('(copy)');
}
Expand Down

0 comments on commit d249a99

Please sign in to comment.