Giter Club home page Giter Club logo

craft-readonly-field's People

Contributors

kringkaste avatar sbstnrch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

craft-readonly-field's Issues

Error when installing plugin on PHP 8.1

Description

While installing the plugin the following error is thrown. I'm guessing this is an error that is thrown when using PHP version 8.1. "readonly" is a reserved name. Check this article

syntax error, unexpected token \"readonly\", expecting identifier
ParseError: syntax error, unexpected token "readonly", expecting identifier in /var/www/vendor/codemonauts/craft-readonly-field/src/Readonly.php:14
Stack trace:
#0 /var/www/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile()
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#2 /var/www/vendor/craftcms/cms/src/services/Plugins.php(914): is_subclass_of()
#3 /var/www/vendor/craftcms/cms/src/services/Plugins.php(229): craft\services\Plugins->createPlugin()
#4 /var/www/vendor/craftcms/cms/src/base/ApplicationTrait.php(1487): craft\services\Plugins->loadPlugins()
#5 /var/www/vendor/craftcms/cms/src/web/Application.php(93): craft\web\Application->_postInit()
#6 /var/www/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application->init()
#7 /var/www/vendor/yiisoft/yii2/base/Application.php(204): yii\base\BaseObject->__construct()
#8 [internal function]: yii\base\Application->__construct()
#9 /var/www/vendor/yiisoft/yii2/di/Container.php(419): ReflectionClass->newInstanceArgs()
#10 /var/www/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build()
#11 /var/www/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get()
#12 /var/www/vendor/craftcms/cms/src/Craft.php(66): yii\BaseYii::createObject()
#13 /var/www/vendor/craftcms/cms/bootstrap/bootstrap.php(242): Craft::createObject()
#14 /var/www/vendor/craftcms/cms/bootstrap/web.php(51): require('...')
#15 /var/www/public/index.php(20): require('...')
#16 {main}

Steps to reproduce

  1. Setup a Craft project on a PHP 8.1 apache server
  2. Install the plugin

Additional info

  • Craft version: 3.7
  • PHP version: 8.1
  • Database driver & version: MySQL

FR: Copy button

Add the possibility to show a copy button next to the field so a user can easily copy/paste the value from the field.

Feature Request: Configurable field type/schema

Thanks for the plugin!

It would be great to be able to define the database column type of the readonly field. Right now it's hardcoded to Schema::TYPE_STRING, but we need Schema::TYPE_INTEGER instead.

Integrate with FeedMe

Hi and thanks for creating this plugin. ๐Ÿ˜ƒ I would like to use this plugin for a read-only id field imported via FeedMe. But I was not able to import to the field when configuring the FeedMe feed. To fix this it seems possible to register this field with FeedMe.

Feature Request: allow the usage of existing fields

It would be nice if you'd be able to use data from let's say globals etc. in the field.

For example: make a global instruction field that's editable by the user. Use that global in the readonly field (where instructions is the handle of the global ).

{{ instructions.fieldHandle }}

It makes the content a lot more managable.

Feature Request: Sortable

This field is fantastic for what we need, but is there a way to make it sortable?

When applied to user accounts, the field is displayed as a column in the Users view, but can't be used to sort.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.