lrotherfield / nibble-forms Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://nibble-development.com/nibble-forms-php-form-class
License: Other
Home Page: http://nibble-development.com/nibble-forms-php-form-class
License: Other
Some of the classes (including the main class) doesn't support PSR completely.
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
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;
}
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
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.
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.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.