How to embed fillable ONLYOFFICE forms into a web page

11 March 2022 By Ksenija 0 1,242

You can easily add an online form to your website, making it available for filling in and downloading as PDF. Read on this post and learn how to do it.

How to embed fillable ONLYOFFICE forms into a web page

A brief intro

We guess you are already familiar with our brand-new forms. If not, here is a quick reminder. Starting from version 7.0 of ONLYOFFICE Docs, you can create, edit and collaborate on online forms, let other users fill them out, and save forms as PDF.

In ONLYOFFICE forms, you work with two main formats. DOCXF is intended for creating form templates from blank or any existing DOCX file. The OFORM format is used for filling out the ready forms.

How to open DOCXF for editing from website

Find and open the index.html file of your ONLYOFFICE Document Server. Then, connect it to the Document Server API. You need to specify configuration parameters for opening a form template.

Once done, a form template can be opened for editing. After editing this file, you can get the form itself. To do so, click the “Save as oform” button.

How to open OFORM for filling from website

You need to add a button which opens the form for filling. Then, add the open_form_template() function.

Take into consideration that the key field is not passed to the configuration of the editors. This field will be automatically generated as a random number. This allows making all sessions of opening the form independent. So, collaboration on the OFORM file is disabled. That’s why anyone can open the form and fill it out without disturbing others.

Once done, a form can be opened for filling. After filling in the fields (the required ones are highlighted with the red border), you can get a PDF file. To do so, click the “Save as PDF” button.

How to embed ONLYOFFICE forms into a web page