Git Product home page Git Product logo

cakephp-datalist's Introduction

Hi My name is rrd

Independent Full Stack Web Developer

I have created my first web project in 1996. Since then I learned, adopted and teached quite a lot of different web technologies.

  • ๐ŸŒ I'm based in Hungary
  • ๐Ÿง  I'm learning Web penetration testing
  • โšก I'm a Hare Krishna monk, living at Krishna-valley

Skills

JavaScript PHP Python Go TypeScript HTML5 Vue Nuxtjs JQuery CSS3 Sass Vite MySQL Firebase Figma

Socials

I'm a Nuxter

rrd108 Nuxter profile

My GitHub Stats

rrd108's GitHub stats

cakephp-datalist's People

Contributors

challgren avatar rrd108 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cakephp-datalist's Issues

Unexpected field in POST data,

hi, i have an security exception that say "Unexpected field '__address.street_id' in POST data" i know that happens because the plugin add an extra input with "__" name, when i do the submit the inputs still exist, and the security component send the exception.

separate auto-save functionality

I was curious and looked into your plugin yesterday evening.

Why not having two:

  • Plain DatalistWidget (just like normal select)
  • DatalistJsWidget etc with JS (and maybe even JS fallback for non supportive browsers = shim) for your additional functionality?

I also found a few flaws in your code
The default value (when posting a form and it didnt validate) is lost on display.

Check my fixed version test:

    'datalist' => '<input type="text" id="{{id}}" name="{{name}}" list="datalist-{{id}}" autocomplete="off"{{inputAttrs}}><datalist id="datalist-{{id}}"{{datalistAttrs}}>{{content}}</datalist>',

and

    $default = isset($data['val']) ? $data['val'] : null;
    unset(...);

    $inputData['value'] = $default;
    $inputAttrs = $this->_templates->formatAttributes($inputData);

    $datalistAttrs = $this->_templates->formatAttributes($data);
    return $this->_templates->format(
        'datalist',
        [
            'name' => $name,
            'inputAttrs' => $inputAttrs,
            'datalistAttrs' => $datalistAttrs,
            'content' => implode('', $options),
            'id' => $data['id'],
        ]
    );

Also, no constructor overwrite needed, or interface implement (parent does that).

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.