Setyenv · Docs
  • English
  • Español
  • 中文
  • 日本語
  • العربية
  • Deutsch
  • Français
  • हिन्दी
  • Bahasa Indonesia
  • Italiano
  • Nederlands
  • Português
  • Русский
  • Türkçe

Blocks & shortcodes

Embed PFM entities on any WordPress page using Gutenberg blocks or classic shortcodes. Both render the same React components.

Gutenberg blocks

BlockWhat it renders
pfm/formA create/edit form for an entity. Configure which entity and optional return URL.
pfm/listA record list with optional filter, columns, page size, and view mode (table/kanban).
pfm/recordA single record card. Configure entity and sys_id.

Each block appears as a placeholder card in the Gutenberg editor. The dynamic content renders on the front-end.

Shortcodes

ShortcodeKey attributes
[pfm_form]entity, sys_id, return_url, success_message
[pfm_list]entity, filter, columns, page_size, view, saved_view
[pfm_record]entity, sys_id, template
[pfm_full_app]none — renders the full admin SPA

List view modes

ModeShortcode attributeDescription
Tableview="table" (default)Rows and columns with sorting and inline edit
Kanbanview="kanban"Cards grouped by a field value

Permissions

  • Blocks and shortcodes respect PFM's permission system
  • Anonymous users see the form if the entity has public in can_create_roles
  • Logged-in users see the form if they match the entity's permission role
  • Denied users see a login prompt or "no permission" message

CSS isolation

All front-end embeds are scoped under .pfm-embed to prevent theme conflicts. Key rules:

  • Fonts and colours inherit from the theme via theme.json variables
  • No !important declarations
  • RTL languages supported via logical properties
  • No icon fonts — all icons are inline SVG
  • Bundle size target: < 50KB gzipped