
內容簡介
加入 WordPress 區塊 (Gutenberg 編輯器) 以便輕鬆嵌入 DriveWorks 專案和 DriveApps。
它使用預先撰寫的 DriveWorks 客戶端 SDK 函數來自動建立客戶端、登入、開始一個規格 / DriveApp 並渲染表單。
注意: 這些區塊需要配置並運行外部 DriveWorks Live 整合伺服器,以允許從您的 WordPress 網域進行連接。
要嵌入 DriveWorks 內容,只需在每個區塊的設置中提供以下內容:
伺服器 URL - 您的整合主題伺服器的 URL。用於載入客戶端庫並建立客戶端連接。
群組別名 - 要連接的群組別名。
類型 - 要渲染的內容類型 (專案或 DriveApp)。
專案名稱或 DriveApp 別名 - 要渲染的專案名稱/ DriveApp 別名 (取決於所選擇的類型)。
您還可以選擇性地設置:
檢查間隔 - 自動發送請求的間隔 (秒)。有助於在沒有手動交互的情況下保持會話活動。將間隔設置為 0 秒或空白值 (預設值) 以停用此功能。
高度 - 嵌入表單的容器高度。如果表單沒有自然高度,這會很有用。
表單完成訊息 - 表單完成時顯示的訊息。這會覆蓋預設訊息。
表單取消訊息 - 表單取消時顯示的訊息。這會覆蓋預設訊息。
它是如何運作的?
此區塊輸出所需的標記以連接至您的 DriveWorks Live 實例並渲染表單。
使用標準方法從 DriveWorks Live 客戶端 SDK 撰寫的預先設置的腳本在您自己的伺服器上運行,執行登錄並渲染配置的表單。
該腳本在登錄期間不會發送任何憑證,因此必須在 DriveWorksConfigUser.xml 中指定預設用戶。
如果未在伺服器端設置預設用戶,則不會授權連接。
重要的是要確保您的 DriveWorks 整合主題伺服器正在正確運行。
您可以通過在瀏覽器中直接訪問配置的伺服器 URL 來檢查這一點。
如果在配置或連接過程中出現任何錯誤,將顯示清晰的警告。
有關如何渲染 DriveWorks 表單的替代範例,請參閱我們的公開 客戶端 SDK 範例 和我們的 官方 GitHub。
外掛標籤
開發者團隊
② 後台搜尋「DriveWorks Block – Form Embed」→ 直接安裝(推薦)
原文外掛簡介
Add a WordPress block (Gutenberg editor) to easily embed DriveWorks Projects and DriveApps.
It uses pre-written DriveWorks Client SDK functions to automatically create a client, login, start a Specification / DriveApp and render the Form.
Note: these blocks require an external DriveWorks Live Integration Server to be configured and running, which allows connections from your WordPress domain.
To embed DriveWorks content, simply provide the following in the settings of each block:
Server Url – The URL of your Integration Theme server. Used to load the client library, and create a client connection.
Group Alias – The alias of the Group to connect to.
Type – The type of content to render (Project or DriveApp).
Project Name OR DriveApp Alias – The name of the Project / alias of the DriveApp to render (depending on type selected).
Optionally you can also set:
Ping Interval – The interval (in seconds) at which the server is automatically sent a request. Useful to keep a session alive without manual interaction. Disable this feature by setting the interval to 0 seconds, or a blank value (the default).
Height – The height of the container that Form is rendered into. Useful if the Form does not have a natural height.
Form Complete Message – The message shown when a Form is completed. This overrides the default message.
Form Cancelled Message – The message shown when a Form is cancelled. This overrides the default message.
On Complete – The page to redirect to upon Specification completion, declare restart to start a new Specification.
On Cancel – The page to redirect to upon Specification cancellation, declare restart to start a new Specification.
How it works?
This block outputs the markup required to connect to your DriveWorks Live instance and render Forms.
A pre-written script using standard methods from the DriveWorks Live Client SDK, running on your own server, performs a login and renders the configured Form.
The script will not send any credentials during login, so a default user must be specified in DriveWorksConfigUser.xml.
If a default user is not set server-side, the connection will not be authorized.
It is important to ensure that your DriveWorks Integration Theme server is running correctly.
You can check this by accessing the configured server url directly in a browser.
Clear warnings will be shown if any errors are made in the config or during connection.
For alternative examples on how to render a DriveWorks Form, see our public Client SDK Examples and our Official GitHub.
