Skip to content

Commit 57a007f

Browse files
authored
Merge pull request #38 from apostrophecms/pro-4965-relationship-max-1
only one form in form widget relationship
2 parents cb72eff + db3dadd commit 57a007f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ We use the default express connect-multiparty size limits. The rule is checked b
1212
This can now be disabled.
1313
* Add divider widget (`<hr>` tag) to form widgets.
1414

15+
### Fixes
16+
17+
* To avoid confusion, we can now select only one form when editing the form widget relationship to form field ('Form to display'). Note that selecting more than one form never had any useful effect.
18+
1519
## 1.1.1 (2023-02-17)
1620

1721
### Fixes

modules/@apostrophecms/form-widget/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ module.exports = {
1313
label: 'aposForm:widgetFormSelect',
1414
type: 'relationship',
1515
withType: '@apostrophecms/form',
16-
required: true
16+
required: true,
17+
max: 1
1718
}
1819
}
1920
},

modules/@apostrophecms/form-widget/ui/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export default () => {
7373
try {
7474
input.recaptcha = await recaptcha.getToken(el);
7575
} catch (error) {
76+
// eslint-disable-next-line
7677
console.error('reCAPTCHA execution error:', error);
7778
apos.util.addClass(recaptchaError, 'apos-form-visible');
7879
return null;

0 commit comments

Comments
 (0)