Creation Form

Automatically generate files—diplomas, certificates, or other documents—directly on your website. Your visitors simply need to fill out the form to receive their file.

You can create files by setting up an HTML form on your website. If that's not an option, you can simply use our widget for file creation.

Form Creation

To send requests for file creation to DiMaker, you'll need to create a form on your website. The form can be placed in either a public or private section of your site. Using your CMS, create a page with the form on it.

Form Action

https://dimaker.app/api/v1/webform-create/

Form Fields

You need to create several hidden fields with the following values:

  • secure*

    Token (string, 36 characters)

  • doc_id*

    Document ID (string, 36 characters) to be used for file generation. You can find the ID in the browser's address bar when the document is open. The document should not be in the Trash but can be located in any folder within the Documents section.

  • mail_id

    Email template ID (string, 36 characters) used for sending the file via email. You can find the template ID in the address bar when the template is open. If this variable is not provided, no email will be sent.

  • email_send

    Determines when to send the email with the file. Possible values:
    onfinish - Send all emails after all files are created (default)
    oncreate - Send emails immediately after each file is created. For a single file, `onfinish` and `oncreate` behave the same.
    timeout - Schedule emails to be sent after a certain delay. In this case, two additional parameters are required:
    email_timeout_value - Numerical value for the delay period (integer)
    email_timeout_unit - Unit of the delay period. Possible values: "m" (minutes), "h" (hours), or "d" (days).
    Alternatively, to specify an exact sending time, provide a UNIX timestamp in email_timeout_timestamp. If both timeout and email_timeout_timestamp are provided, the latter takes priority.

  • folder_id

    Folder ID (string, 36 characters) in the Disk where files will be saved. If the folder doesn't exist, it will be created automatically when the first file is generated.

  • page_id

    Sheet number (integer or string), if the document contains multiple sheets. You can specify a single sheet number (first sheet is 0) or a comma-separated list of sheet numbers to be used for file creation.

Send the File to Yourself

The file will be sent to your account's registered email address immediately after it is created. In the "Email Template" field, you can select a template to use for sending the email. You can create a custom template in Email Templates. If you include the %data variable in the email text, all file-related data will be inserted into the email as a table.

Scripts and Styles

Go to the Integration Page to copy the script code, then insert it into the HEAD or any other section of your page. You don't need to add this code to every page on your site—only the page with the form.

Additionally, you need to create two sections with the IDs `result-success` and `result-danger`. Both sections should initially be hidden with a `display:none` style. The first section can display a success message when a file is successfully generated. This section will be shown upon a successful request. If an error occurs, the message will be displayed in the `result-danger` section, and the error details will be automatically inserted.

Inserting Variables into the Document

Your document should have at least one variable to replace, such as %name or %course. Add fields to the form where the variable names begin with `mask_`, for example, `mask_name` or `mask_course`. Data entered by visitors into these fields will replace the respective variables in the document's text. Use the `mask_email` variable for email addresses. To send emails to multiple addresses, separate them with commas or spaces. In this case, the email sending status in the Disk will be shown only for the first address.

Testing the Form

Once the form is created, publish the page and test it. A file will be generated and displayed in a modal window for download.

One Document = One Submission

If desired, you can limit the number of submissions per document. If a file with the specified `doc_id` has already been created for the given email address, a warning message will inform the user that only one file can be created.

User Documents

You can display a user's documents in the private section of your site. To do this, create a form as described above, then add hidden fields for `email`, `secure`, and `doc_id`. For the `email` field, use the visitor's email, and for `doc_id`, use the value `all`. When the page is accessed, the visitor will see a list of all their documents with download options, instead of the form. If the visitor has already filled out the form, their file will be shown directly. Make sure the email field is hidden and automatically populated by your CMS.


Other Integrations

Ready to start?

Open Open App