Giter Site home page Giter Site logo

nibble-forms's People

Contributors

haykokoryun avatar lrotherfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nibble-forms's Issues

PSR Support

Some of the classes (including the main class) doesn't support PSR completely.

Call to a member function addConfirmation() on boolean (when running in wordpress)

Hi,

I can run the example form without issues from the PHP cli and as a standalone php web page. But, when I try to run it as part of my Wordpress app I get this Fatal Error

"Call to a member function addConfirmation() on boolean "

If I remove the addConfirmation (password or email), I can render the form.

I understand this is not a direct issue to your classes. I would appreciate it if you could point me in the right direction to gets this working under Wordpress.

Thank You

Marcelo

Bug whith CheckBox

When you valid a form with 0 checked checkbox, there is the warning "Invalid argument supplied for foreach()"... So i just added a is_array (In the MultipleOptions file) :

public function validate($val)
    {
        if (is_array($val)) {
            if ($this->minimum_selected && count($val) < $this->minimum_selected) {
                $this->error[] = sprintf('at least %s options must be selected', $this->minimum_selected);
            }
        } elseif ($this->required) {
            $this->error[] = 'is required';
        }
        if(is_array($val)) {
            foreach ($val as $answer) {
                if (in_array($answer, $this->false_values)) {
                    $this->error[] = "$answer is not a valid choice";
                }
            }
        }

        return !empty($this->error) ? false : true;
    }

TextArea.php

I came across issue of the autoloader is looking for Textarea.php and the filename is TextArea.php

On some servers I have used this it does not find the file so would suggest filename becoming Textarea.php

Form name and id - how to add?

I've been evaluating several form packages to integrate into my custom Joomla projects, and Nibble Forms 2 is definitely on my shortlist.

There are a couple of issues, however.

  1. It doesn't look like the generated form tags have either an id or name attribute. Within a CMS ecosystem, it is very important to be able to tag each form with a unique name and/or id. The id option is very useful when using client-side frameworks such as jQuery.

  2. I noticed in the following line in the NibbleForms.php file: protected $name = 'nibble_form';
    What if I don't want to use 'nibble_form'?

I read through the documentation but didn't see anything that specifically addresses this. If there is, could you please point me to it? Thanks!

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.