GithubHelp home page GithubHelp logo

Comments (5)

janhartigan avatar janhartigan commented on June 19, 2024

Funny you should mention that....I was just adding support for bool and enum fields. If you want to play with it, it's currently in the 2.2.0 branch.

https://github.com/FrozenNode/Laravel-Administrator/tree/2.2.0

from laravel-administrator.

iicmaster avatar iicmaster commented on June 19, 2024

Oh! it's look very cool, but I found some thing not sure is this a bug, bool field not working correctly in edit page maybe because I store 0,1 in database not true/false but bool field sent true/false value but everything working well in filters and new

from laravel-administrator.

iicmaster avatar iicmaster commented on June 19, 2024

example case: my form has 3 bool field and already checked then I save with out edit anything all of bool field set to unchecked

from laravel-administrator.

janhartigan avatar janhartigan commented on June 19, 2024

Hmm I can't seem to replicate this. Can you show me how you're setting up the field and be a little more specific with how it is behaving and what you expect?

from laravel-administrator.

iicmaster avatar iicmaster commented on June 19, 2024

Sorry for my confusing description, I don't think my english is good enough for explain complicated thing 555

but I will try this is my code and all of my bool field is store in db with tinyint (1)

public $edit = array(
    'role' => array(
        'title' => 'Role',
        'type' => 'enum',
        'options' => array(
            'user' => 'User', 
            'owner' => 'Owner', 
            'admin' => 'Admin', 
            'superadmin' => 'Super Admin'
        ),
    ), 
    'account_name' => array(
        'title' => 'Account Name',
        'type' => 'text'
    ),
    'curator_type' => array(
        'title' => 'Curator Type',
        'type' => 'enum',
        'options' => array(
            "00" => 'User', 
            "01" => 'Normal Curator', 
            "02" => 'Fetured Curator'
        ),
    ), 
    'email' => array(
        'title' => 'Email',
        'type' => 'text'
    ),
    'facebook_user' => array(
        'title' => 'Facebook',
        'type' => 'bool',
    ),
    'is_active' => array(
        'title' => 'Active',
        'type' => 'bool',
    ),
    'is_verified' => array(
        'title' => 'Verified',
        'type' => 'bool',
    )
); 
  1. I create new item and checked all my bool checkbox and click 'Create'
  2. I click my new item to open edit window
  3. ok everything fields display correct data and ervery checkbox is checked
  4. I click 'Save' without edit anything
  5. Oh! all of my data in bool field is 0

from laravel-administrator.

Related Issues (20)

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.