Code Monkey home page Code Monkey logo

fluentform's People

Contributors

anaxamaxan avatar dfreerksen avatar stickgrinder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fluentform's Issues

Selected option for dropdowns?

->add_dropdown_field('field', 'Label', array('1' => 'My option', '2' => 'Another option'), 'required', '1');

Gives me a ton of SimpleXML errors if I set that last param (value).

Any ideas?

Sections: taxonomies for form fields

Up to 2.0 version, there is no "logical" clue on different form sections other than fieldsets (imagine a multistep form with several fieldsets in each step). Form Sections would be a way to "categorize" fields to fall into one or more sections. Think them as a field-tagging system that creates orthogonal sets of fields that can be rendered with a single command.

The solution I can foresee is to create a register of tags, with associated field names, so that I could reverse-search tagged fields.
This can be approached in one or more of the following:

  • Add a property to all fields-adder methods to specify a list of tags
  • Add a tag() method that take an array of fieldnames
  • Add a ->tag() method that add tags fluently after a field creation

Any clue?

Possibility to nest fieldsets

Version 2.x allow to create field groups as HTML fieldset elements. That's good enough since HTML fieldset is specifically designed for this task, but there is no way to "nest" fieldsets.

Solve this adding proper methods and handlers.

Form nesting and compositing

As of 2.0 there is no way to "import" a form into another one. Say I have an "Address" form and a "complete your order" one. While completing an order the user should specify both billing and shipping addresses. I could then just import/embed "Address" form twice, reusing code.

Some note on this:

  • Add a parameter to import form as items only, wrapped within a fieldset and/or within a section (see issue #3)
  • Add a parameter to specify field naming in relation to holding form

Increment security of forms

FluentForm shall not be fluent for developer only: we could make it a first-class user experience form factory by introducing three antispam measures:

  • honeypot field
  • timestamp validation
  • fieldname shuffling and encoding

These three techniques can render a form nearly unbreakable while not punishing the user as a CAPTCHA does.

Checkbox checked value not being set

If I have a checkbox on the page and I check it and then hit submit on the form, if the form returns with validation errors, the checkbox is no longer checked.

Also if I have a form where I set the checkbox to checked, it will not check the checkbox when it is rendered on the page. The code I am using is
$form->add_checkbox ('permissions['.$permission['id'].']', $permission['label'], $permission['id'], 'trim', TRUE);

Am I doing something wrong with either of these issues?

MY_Form_validation

I am using the latest version of FluentForms. I have a MY_Form_validation which extended Form_validation. FluentForm is avoiding the custom validation methods in MY_Form_validation.

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.