DiMaker DiMaker В чём разница?

Creation form

Automatic creation of files on your website - diplomas, certificates or something else. The visitor to your website will only need to fill out the form and receive the file.

To create files, you need to create an HTML form on your website. If this is not possible, then simply use the creation widget.

Creating a form

To send requests for file creation to DiMaker, you need to create a form on your website. This form can be located in both the public and private parts of your site. Using your CMS, create a page and a form on the page.

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*

    ID of the document (string, 36 characters) that will be used to create the file. The ID can be obtained from the address bar when the document is open. The document should not be in the trash, but can be in any folder of the Documents.

  • mail_id

    Template ID for sending email (string, 36 characters). The ID can be obtained from the address bar when the template is open. If the variable is not passed, the email will not be sent.

  • email_send

    The time to send the email with the file. Can take the following values:
    onfinish - Send all emails after all files are created (default)
    oncreate - Send emails immediately after creating the file. When creating one file, onfinish and oncreate are identical.
    timeout - send emails after a time interval. In this case, you need to pass two more parameters:
    email_timeout_value - a numerical value of the interval at which to send emails, an integer value
    email_timeout_unit - a unit of time for the interval. Can take the value "m" (minutes), "h" (hours), "d" (days).
    Alternatively, to specify a specific sending time, you need to pass the time in unix time format in email_timeout_timestamp. If both timeout and email_timeout_timestamp are passed, the latter will have priority.

  • folder_id

    ID of the folder in Disk (string, 36 characters) to save files. If the folder does not exist, it will be created automatically when the first file is created.

  • page_id

    The ordinal number of the sheet (number or string), if there are several sheets in the document. You can pass one number (the first sheet - 0), or numbers (comma separated) of the sheets to be used to create the file.

Sending a file to yourself after creating it

The file will be sent to the email address associated with the account immediately after it is created. In the "Email Template" field, you can choose which template to use for sending the email. Beforehand, you can create a separate template for sending emails to your email address in Email Templates. If you write the variable %data in the email text, all file data will be added as a table in that place.

Script and Styles

On the Integration page, you need to copy the code and paste it into the HEAD or any other part of the page. You don't need to add this code to all pages of your site. You only need to add this code to the page with the form.

Additionally, you need to create two blocks with the IDs "result-success" and "result-danger". Both blocks should be hidden with the style display:none; In the first block, you can write the text for successful file creation. This block will be shown upon successful submission. If there's any error, the block with the ID "result-danger" will be displayed. The error text will be automatically inserted into that block.

Document Substitution

Your document should have at least one variable to replace, such as %name or %course. Add a field in the form where the variable name should start with mask_, for example, mask_name or mask_course. The visitor's entered data in these fields will be replaced with the corresponding variables in the document text. To specify an email address, use the variable mask_email. To send emails to multiple addresses, separate them with commas or spaces. The submission status on Drive will be displayed based on the first email address.

Form Functionality

After creating the form, you can open the published page and test the form's functionality. A file will be created and displayed in a popup window for download.

One Document = One Submission

You can optionally limit the number of form submissions. If a file with the doc_id has already been created for the specified email address, a warning message will be displayed, stating that only one file can be created.

My Documents

You can display a person's documents in the closed section of your website. To do this, create a form as described above. Then add hidden fields for email, secure, and doc_id. In the first field, put the visitor's email address, and in the last field, enter "all". Upon opening this page, the visitor will see a list of all documents with the option to download them, instead of the form. If you want the visitor to see their file instead of the form if they have previously submitted the form, hide the email field in the form and automatically fill it in with your CMS.


Другие интеграции