Dashboard

Headless 2SIGN— WordPress stores envelopes and contract templates; this app is the initiator-facing UI (WPGraphQL).

WordPress: add template HTML & schema

Needed before PDF generation shows real contract content. Meta keys are registered by the 2SIGN plugin (template_html, template_schema).

  1. In WordPress Admin, open Contract Templates and edit a template.
  2. In the block editor: menu PreferencesPanels → enable Custom fields, then add fields below the post (or use any tool that writes REST/Gutenberg-visible meta).
  3. Set Name template_html and paste HTML (trusted authors only). Use tokens such as {{client_name}}.
  4. Optional: Name template_schema — JSON array of fields, e.g. [{"name":"client_name","label":"Client","type":"text"}] for the dynamic form on the template page.

Starter snippets for WordPress

Copy into Contract Templates custom fields template_html and template_schema. HTML must come from trusted authors; user-filled values are escaped when merged.

Example template_html

<section class="contract">
  <h1>Sample rental agreement</h1>
  <p><strong>Tenant:</strong> {{client_name}}</p>
  <p><strong>Property:</strong> {{property_address}}</p>
  <p><strong>Effective date:</strong> {{effective_date}}</p>
  <p>This is placeholder HTML for PDF generation tests.</p>
</section>

Example template_schema

[
  {"name":"client_name","label":"Tenant full name","type":"text"},
  {"name":"property_address","label":"Property address","type":"text"},
  {"name":"effective_date","label":"Effective date","type":"text"}
]