DEV Community

Cover image for Base field class for form generator
alexdodonov
alexdodonov

Posted on

2 2

Base field class for form generator

Intro

This class will help you to construct forms in PHP code.

Installation

Just print in console

composer require mezon/field
Enter fullscreen mode Exit fullscreen mode

And that's all )

Learn more

More information can be found here:

Twitter

dev.to

Reference

Method compiles field into HTML code:

public function html(): string
Enter fullscreen mode Exit fullscreen mode

Method returns title for the field:

public function getTitle(): string
Enter fullscreen mode Exit fullscreen mode

Method returns true if the field is required, false otherwise:

public function isRequired(): bool
Enter fullscreen mode Exit fullscreen mode

Method returns true if the field is visible and false otherwise:

public function isVisible(): bool
Enter fullscreen mode Exit fullscreen mode

Method returns true if the field has label, false otherwise:

public function hasLabel(): bool
Enter fullscreen mode Exit fullscreen mode

Method returns true if the field fills the whole row in the form, false otherwise:

public function fillAllRow(): bool
Enter fullscreen mode Exit fullscreen mode

It will be great if you will contribute something to this project. Documentation, sharing the project in your social media, bug fixing, refactoring, or even submitting issue with question or feature request. Thanks anyway )

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more