Web Managed Forms - Gadreel/dcraft GitHub Wiki

TODO

Managed forms are a special case of forms that save into a special Bucket called 'ManagedForms'.

ManagedForms must have an Alias

Script

[site]/buckets/ManagedForm.groovy

Storage

[site]/buckets/ManagedForm/[form alias]/[uuid or token]

Example

<dcm.ManagedForm Alias="contact">
	<dcf.Text Name="First" Label="First" Record="Names" />
	<dcf.Text Name="Last" Label="Last" Record="Names" />
	<dcf.Text Name="Phone" Label="Phone" Record="Contact" />
	
	<dcf.FormButtons>
		<dcf.SubmitButton />
	</dcf.FormButtons>
</dcm.ManagedForm>

stored in json file in folder for the token.

[site]/buckets/ManagedForm/contact/nnnnn/data.json

attachments also stored in this folder

Event

once a form is saved, an event with the Alias and the Token is risen.