PHPackages                             getolympus/olympus-dionysos-field-text - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. getolympus/olympus-dionysos-field-text

ActiveOlympus-field[Framework](/categories/framework)

getolympus/olympus-dionysos-field-text
======================================

Text field, this component is a part of the Olympus Dionysos fields.

v0.0.23(2y ago)02462MITPHPCI failing

Since Apr 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/GetOlympus/olympus-dionysos-field-text)[ Packagist](https://packagist.org/packages/getolympus/olympus-dionysos-field-text)[ Docs](https://github.com/GetOlympus/olympus-dionysos-field-text)[ RSS](/packages/getolympus-olympus-dionysos-field-text/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (24)Used By (2)

[![](https://github.com/GetOlympus/olympus-dionysos-field-text/raw/master/assets/field-text.png)](https://github.com/GetOlympus/olympus-dionysos-field-text/blob/master/assets/field-text.png)

Dionysos Text Field
===================

[](#dionysos-text-field)

[![Olympus Component](https://camo.githubusercontent.com/f483886a465a9e44005a352c6c1ba6556689a579ecf0d8b984cf60becaaa878c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f666f722d4f6c796d7075732d3434636331312e7376673f7374796c653d666c61742d737175617265)](https://github.com/GetOlympus)[![CodeFactor Grade](https://camo.githubusercontent.com/4cdbf9a1c13f305f9a9d0cd5089c58a28c81781c5914c083721f34f22e92e268/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f4765744f6c796d7075732f6f6c796d7075732d64696f6e79736f732d6669656c642d746578742f62616467653f7374796c653d666c61742d737175617265)](https://www.codefactor.io/repository/github/getolympus/olympus-dionysos-field-text)[![Packagist Version](https://camo.githubusercontent.com/b8619c7674ea4925ad63c60459422b16a4fbabcfefcde556107f494ba4283976/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765746f6c796d7075732f6f6c796d7075732d64696f6e79736f732d6669656c642d746578742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/getolympus/olympus-dionysos-field-text)[![MIT](https://camo.githubusercontent.com/68035de4b7f69ada20e98e34172f47d361b83a017c8045200fc338660c467897/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49545f4c6963656e73652d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/GetOlympus/olympus-dionysos-field-text/blob/master/LICENSE)

> This component is a part of the **Olympus Dionysos fields** for **WordPress**.
> It uses the default WordPress text field to display password, range, text, datetime, tel, and more fields.

```
composer require getolympus/olympus-dionysos-field-text
```

---

Table of contents
-----------------

[](#table-of-contents)

[Field initialization](#field-initialization) • [Variables definition](#variables-definition) • [Settings definition](#settings-definition) • [Retrive data](#retrive-data) • [Release History](#release-history) • [Contributing](#contributing)

---

Field initialization
--------------------

[](#field-initialization)

Use the following lines to add a `text field` in your **WordPress** admin pages or custom post type meta fields:

```
return \GetOlympus\Dionysos\Field\Text::build('my_text_field_id', [
    'title'       => 'What do you like?',
    'default'     => 'Penguins, I am sure they\'re gonna dominate the World!',
    'description' => 'Put in here everything you want.',
    'placeholder' => 'McDonald\'s as well',
    'type'        => 'text',

    /**
     * Settings definition
     * @see the `Settings definition` section below
     */
    'settings' => [],
]);
```

Variables definition
--------------------

[](#variables-definition)

VariableTypeDefault value if not setAccepted values`title`String`'Text'`*empty*`default`String*empty**empty*`description`String*empty**empty*`placeholder`String*empty**empty*`type`String`'text'`see [Accepted type](#accepted-type)`settings`Arraysee [Field initialization](#field-initialization)see [Settings definition](#settings-definition)### Accepted type

[](#accepted-type)

- `date` see [Date type](#date-type)
- `datetime-local` see [Datetime-local type](#datetime-local-type)
- `email` see [Email type](#email-type)
- `hidden` see [Hidden type](#hidden-type)
- `month` see [Month type](#month-type)
- `number` see [Number type](#number-type)
- `password` see [Password type](#password-type)
- `range` see [Range type](#range-type)
- `search` see [Search type](#search-type)
- `tel` see [Tel type](#tel-type)
- `text` see [Text type](#text-type)
- `time` see [Time type](#time-type)
- `url` see [URL type](#url-type)
- `week` see [Week type](#week-type)

Settings definition
-------------------

[](#settings-definition)

The `settings` variable is an array of options depending on `type` value.
In all cases, here are the default settings with their explanations:

VariableTypeDefault value if not setAccepted values`attrs`String*empty**empty*`after`String*empty**empty*`before`String*empty**empty*`class`String*empty**empty*`readonly`Boolean`false``true` or `false`- **Special case:** `attrs` will let you add all additional attributes you need, such as `data-*`. **Pay attention** to this!
- `after` will insert contents after the field. In `number` and `range` cases, the `after` content will prepend the `max` value
- `before` will insert contents before the field. In `number` and `range` cases, the `before` content will append the `min` value
- `class` will add CSS classes to the already-in `regular-text` field class (not used in `hidden` case)
- `readonly` will avoid the field to be used when its value is set to `true`

### Date type

[](#date-type)

Full documentation on [Mozilla Date page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/date)

VariableTypeDefault value if not setAccepted values`max`Date*empty*latest date to accept in `yyyy-MM-dd` format`min`Date*empty*earliest date to accept in `yyyy-MM-dd` format`step`Integer*empty*integer, to read as `day`### Datetime-local type

[](#datetime-local-type)

Full documentation on [Mozilla Datetime-local page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/datetime-local)

VariableTypeDefault value if not setAccepted values`max`Date*empty*latest date to accept in `yyyy-MM-ddThh:mm` format`min`Date*empty*earliest date to accept in `yyyy-MM-ddThh:mm` format`step`Integer*empty*integer, to read as `second`### Email type

[](#email-type)

Full documentation on [Mozilla Email page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/email)

VariableTypeDefault value if not setAccepted values`maxlength`Integer*empty**empty*`minlength`Integer*empty**empty*`multiple`Boolean`false``true` or `false``pattern`String*empty*javascript regular expression`size`Integer*empty**empty*`spellcheck`Boolean`false``true` or `false`### Hidden type

[](#hidden-type)

Full documentation on [Mozilla Hidden page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/hidden)

VariableTypeDefault value if not setAccepted values`display`Boolean`false``true` or `false`This special `display` variable defines if the hidden field have to show field value or not:

- set to `false`, a sentence will show where the value is stored in Database
- set to `true`, a sentence will show where the value is stored in Database and what is the current value

### Month type

[](#month-type)

Full documentation on [Mozilla Month page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/month)

VariableTypeDefault value if not setAccepted values`max`Date*empty*latest date to accept in `yyyy-MM` format`min`Date*empty*earliest date to accept in `yyyy-MM` format`step`Integer*empty*integer, to read as `month`### Number type

[](#number-type)

Full documentation on [Mozilla Number page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/number)

VariableTypeDefault value if not setAccepted values`max`Float*empty**empty*`min`Float*empty**empty*`step`Float*empty**empty*### Password type

[](#password-type)

Full documentation on [Mozilla Password page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/password)

VariableTypeDefault value if not setAccepted values`maxlength`Integer*empty**empty*`minlength`Integer*empty**empty*`pattern`String*empty*javascript regular expression`size`Integer*empty**empty*### Range type

[](#range-type)

Full documentation on [Mozilla Range page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/range)

VariableTypeDefault value if not setAccepted values`datalist`Array*empty*list of suggestions users can pick to automatically fill the control's value`max`Float*empty**empty*`min`Float*empty**empty*`step`Float*empty**empty*This `range` type will display an input `number` HTML tag with the field value.

### Search type

[](#search-type)

Full documentation on [Mozilla Search page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/search)

VariableTypeDefault value if not setAccepted values`maxlength`Integer*empty**empty*`minlength`Integer*empty**empty*`pattern`String*empty*javascript regular expression`size`Integer*empty**empty*`spellcheck`Boolean`false``true` or `false`### Tel type

[](#tel-type)

Full documentation on [Mozilla Tel page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/tel)

VariableTypeDefault value if not setAccepted values`maxlength`Integer*empty**empty*`minlength`Integer*empty**empty*`pattern`String*empty*javascript regular expression`size`Integer*empty**empty*### Text type

[](#text-type)

Full documentation on [Mozilla Text page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/text)

VariableTypeDefault value if not setAccepted values`maxlength`Integer*empty**empty*`minlength`Integer*empty**empty*`pattern`String*empty*javascript regular expression`size`Integer*empty**empty*`spellcheck`Boolean`false``true` or `false`### Time type

[](#time-type)

Full documentation on [Mozilla Time page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/time)

VariableTypeDefault value if not setAccepted values`max`Date*empty*latest time to accept in `hh:mm` or `hh:mm:ss` format`min`Date*empty*earliest time to accept in `hh:mm` or `hh:mm:ss` format`step`Integer*empty*integer, to read as `second`When the `step` variable is provided, browser will add the seconds input area adjacent to the minutes section.
The `max` and `min` variables format will automatically be forced to `hh:mm:ss`.

### URL type

[](#url-type)

Full documentation on [Mozilla URL page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/url)

VariableTypeDefault value if not setAccepted values`datalist`Array*empty*list of suggestions users can pick to automatically fill the control's value`maxlength`Integer*empty**empty*`minlength`Integer*empty**empty*`pattern`String*empty*javascript regular expression`size`Integer*empty**empty*`spellcheck`Boolean`false``true` or `false`### Week type

[](#week-type)

Full documentation on [Mozilla Week page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/week)

VariableTypeDefault value if not setAccepted values`max`Date*empty*latest time to accept in `yyyy-Www` format`min`Date*empty*earliest time to accept in `yyyy-Www` format`step`Integer*empty*integer, to read as `1week`Retrive data
------------

[](#retrive-data)

Retrieve your value from Database with a simple `get_option('my_text_field_id', '')` (see [WordPress reference](https://developer.wordpress.org/reference/functions/get_option/)):

```
// Get text from Database
$text = get_option('my_text_field_id', '');

// Display text
echo $text;
```

Release History
---------------

[](#release-history)

VersionNote0.0.23Fix jQuery integration on domReady0.0.22Change main DIV id to avoid HTML conflicts for labels0.0.21Enable `datalist` suggestions for `range` typeContributing
------------

[](#contributing)

1. Fork it ()
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

---

**Built with ♥ by [Achraf Chouk](https://github.com/crewstyle "Achraf Chouk") ~ (c) since a long time.**

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~133 days

Recently: every ~345 days

Total

22

Last Release

874d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c255b14ebf8b792ba8b0c9940bd13e899281fc1431f1088af9074acdaa191cef?d=identicon)[crewstyle](/maintainers/crewstyle)

---

Top Contributors

[![crewstyle](https://avatars.githubusercontent.com/u/1572149?v=4)](https://github.com/crewstyle "crewstyle (30 commits)")

---

Tags

customemailfieldframeworkolympus-zeuspasswordphptexttwigwordpressphpsearchframeworkwordpressemailpassworddatetimetimedatetexthiddenfieldnumberrangecustomtelMonthweekdatetime-localolympusdionysos

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/getolympus-olympus-dionysos-field-text/health.svg)

```
[![Health](https://phpackages.com/badges/getolympus-olympus-dionysos-field-text/health.svg)](https://phpackages.com/packages/getolympus-olympus-dionysos-field-text)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
