pom/form

An easy way to render form fields in WordPress.

dev-main 2024-03-22 10:41 UTC

This package is auto-updated.

Last update: 2024-04-22 10:46:28 UTC


README

An easy way to render form fields in WordPress.

Install

composer require pom/form

Requirements

  • PHP 7.4 or higher
  • WordPress 5.0 or higher.

Dependencies

This package uses the following third party libraries:

How to use

To output any field first you need to import the required class:

use PomatioFramework\Pomatio_Framework;

Example of how to render a field:

echo (new Pomatio_Framework())::add_field([
    'type' => 'text',
    'label' => 'Test Framework',
    'description' => 'Lorem ipsum dolor sit amet consectetur adipiscing elit.',
    'placeholder' => 'Lorem Ipsum', // optional
    'name' => 'name',
    'class' => 'regular-text',
    'value' => '',
    'description_position' => 'below_label' // optional
    'default' => '' // optional
]);

Docs

The framework is fully documented here.