GithubHelp home page GithubHelp logo

list-field_type's Introduction

README

What is this repository for?

A simple list field-type for Pyrocms 3 that allows you to add dynamic lists to items without end users breaking the layout.

Reorder, Add more lines, remove them

How do I use this?

Returns an array of values {{ visiosoft.field_type.list.values }}

Returns the number of list items {{ visiosoft.field_type.list.count }}

Configuration

Below is the full configuration available with defaults.

protected $fields = [
    "example" => [
        "type"   => "emange.field_type.list",
        "config" => [
            "min" => null,
            "max" => null
        ]
    ]
];

Basic Configuration

Default Value

"default_type" => "text"

The default_value allows you to set the input type for validation. Supports text and email.


Usage

Setting Values

You must set the list field type value with a value or values from the available options.

$entry->example = "foo";

You can set multiple values with an array.

$entry->example = ["foo", "bar"];

Basic Output

The list field type returns an array of values.

$entry->example->values; // ["foo", "bar"];

list-field_type's People

Contributors

fatihalp avatar

Stargazers

 avatar

Watchers

James Cloos avatar Ozcan Durak avatar

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.