Skip to content

Commit bf7d77f

Browse files
authored
Merge pull request #7530 from umbraco/forms/13.7-16.2-rcs
Forms 13.7.0-rc and 16.2.0-rc release notes
2 parents 7c177b1 + 62aee9b commit bf7d77f

File tree

10 files changed

+508
-414
lines changed

10 files changed

+508
-414
lines changed

13/umbraco-forms/developer/ajaxforms.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ Examples demonstrating how to handle a file upload and use reCAPTCHA fields are
544544

545545
## Working with the CMS Content Delivery API
546546

547-
The [Content Delivery API](https://docs.umbraco.com/umbraco-cms/v/12.latest/reference/content-delivery-api) provides headless capabilities within Umbraco by allowing you to retrieve content in JSON format.
547+
The [Content Delivery API](https://docs.umbraco.com/umbraco-cms/13.latest/reference/content-delivery-api) provides headless capabilities within Umbraco by allowing you to retrieve content in JSON format.
548548

549549
When retrieving content that contains an Umbraco Forms form picker, the output by default will consist of the ID of the selected form:
550550

@@ -570,7 +570,7 @@ When retrieving content that contains an Umbraco Forms form picker, the output b
570570
}
571571
```
572572

573-
With [expanded output](https://docs.umbraco.com/umbraco-cms/v/12.latest/reference/content-delivery-api#output-expansion) for the property, the full details of the form will be available. The structure and content of the form representation will be exactly the same as that provided by the Forms API itself.
573+
With [expanded output](https://docs.umbraco.com/umbraco-cms/13.latest/reference/content-delivery-api#output-expansion) for the property, the full details of the form will be available. The structure and content of the form representation will be exactly the same as that provided by the Forms API itself.
574574

575575
```json
576576
{
@@ -598,3 +598,16 @@ With [expanded output](https://docs.umbraco.com/umbraco-cms/v/12.latest/referenc
598598
}
599599
}
600600
```
601+
602+
## Dynamic form injection
603+
For dynamic form injection on a page, such as in a modal dialog, there's a specific JavaScript event and API method. This allows reinitializing Umbraco Forms for the new content.
604+
605+
```javascript
606+
// Execute a reinitialize on dynamic injections
607+
const reinitializeEvent = new Event('umbracoFormsReinitialize');
608+
document.dispatchEvent(reinitializeEvent);
609+
610+
// Render a specific form via the API
611+
const injectedForm = document.getElementById('injected-umbraco-form');
612+
window.UmbracoForms.reinitialize(injectedForm);
613+
```

0 commit comments

Comments
 (0)