Inicio - Documentación - POM Theme - 11 Developers - 11.1 Programmatic forms - Render and submit programmatic forms

Render and submit programmatic forms

pom_render_programmatic_form() returns complete markup and registers the server-side payload needed by the normal POM Forms submission pipeline.

Render

Call it during a frontend render after POM Theme has loaded:

if ( function_exists( 'pom_render_programmatic_form' ) ) {
    echo pom_render_programmatic_form( $layout, $config, $args );
}

The returned string is trusted POM renderer output. Do not run it through esc_html(), which would break the form; ensure every value inserted into $layout, $config and $args was built/sanitized by the integration.

Submission identity

POM derives a stable numeric runtime form ID and signed token from the form definition. The token addresses a short-lived transient. When full-page cache or transient expiry removes it, a signed rebuild descriptor can reconstruct the exact code-owned definition.

Never expose a rebuilder that accepts arbitrary recipients, field schema, callbacks or post IDs without validation.

Assets

The runtime renderer enqueues the standard form assets and optional Google Drive upload assets when the layout requires them. Do not enqueue the entire form bundle site-wide from the integration.

Test matrix

  • signed-out and signed-in submission;
  • nonce refresh after a cached page;
  • payload rebuild after transient removal;
  • success and each validation failure;
  • conditional branches;
  • recipient routing;
  • storage/retention;
  • uploads and Drive when used;
  • duplicate submit protection;
  • mobile layout and keyboard focus;
  • absence/fallback when POM Theme or Forms is disabled.