內容簡介
以下是該 WordPress 外掛的總結:
這個外掛通過在項目清單中直接將單個表單條目以 .json 文件的形式導出,增強了 Gravity Forms 的功能。它讓您可以在每個表單的設置內使用模板編輯器定義自定義的 JSON 結構,您可以插入 Gravity Forms 合併標記,甚至利用條件邏輯短代碼。一個實時預覽功能可以幫助您在導出之前驗證您的 JSON 模板。
接下來是問題與答案:
<ul>
<li>如何啟用這個外掛?
<ul>
<li>答案:啟用外掛。</li>
</ul>
</li>
<li>要去哪裡設置所需表單的設定?
<ul>
<li>答案:前往「表單 > 表單」,然後選擇所需表單的「設置」。</li>
</ul>
</li>
<li>如何進行自定義 JSON 輸出模板的設置?
<ul>
<li>答案:點擊「JSON Export」標籤,然後在文本區域中輸入您想要的 JSON 結構。</li>
</ul>
</li>
<li>如何預覽生成的 JSON?
<ul>
<li>答案:點擊「預覽 JSON Export」按鈕,查看基於該表單的最新條目生成的 JSON 的實時預覽。</li>
</ul>
</li>
<li>如何導出條目?
<ul>
<li>答案:前往「表單 > 條目」,將鼠標懸停在條目上,然後點擊「下載 JSON Export」鏈接。</li>
</ul>
</li>
</ul>
外掛標籤
開發者團隊
② 後台搜尋「Custom JSON Export for Gravity Forms」→ 直接安裝(推薦)
原文外掛簡介
This plugin enhances Gravity Forms by providing the ability to export individual form entries as a .json file directly from the entries list. It allows you to define a custom JSON structure using a template editor within each form’s settings, where you can insert Gravity Forms merge tags and even utilize conditional logic shortcodes. A live preview feature helps you validate your JSON template before export.
Instructions
Activate the plugin.
Go to Forms > Forms, then select ‘Settings’ for the desired form.
Click on the ‘JSON Export’ tab.
Enable JSON Export Link: Check the box to display the “Download JSON Export” link on individual entry pages for this form.
Custom JSON Output Template: Enter your desired JSON structure in the textarea.
Use standard Gravity Forms merge tags (e.g., {field_id}, {entry_id}, {date_created:format:Y-m-d}).
Merge tags will be automatically formatted as "key":"{merge_tag}" when inserted from the dropdown.
You can also use Gravity Forms conditional shortcodes (e.g., [gravityforms action='conditional' merge_tag='{Name (First):1.3}' condition='isnot' value='Philip']"custom_field":"conditional_value"[/gravityforms]) to include dynamic content.
Preview JSON Export: Click the ‘Preview JSON Export’ button to see a live preview of your generated JSON based on the latest entry for that form. This helps in validating your template.
Save Settings: Click ‘Save Settings’ to apply your changes.
To export an entry, go to Forms > Entries, hover over an entry, and click the ‘Download JSON Export’ link.
