GithubHelp home page GithubHelp logo

depage / depage-forms Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 10.0 1.5 MB

depage-forms is PHP library for HTML form generation with focus on usability. It is part of the upcoming version of depage-cms, but it also works as a standalone library. By abstracting HTML, browser flaws (duplicate form submissions) and form validation, it provides a comfortable way to obtain reliable and validated data from users.

Home Page: http://docs.depage.net/depage-forms/

PHP 41.61% Makefile 0.20% CSS 5.21% JavaScript 50.08% SCSS 2.90%
form-builder forms html5-forms php php-library

depage-forms's People

Contributors

benedict-w avatar bwl21 avatar jonasjonas avatar tremlin avatar uglybob avatar vascowhite avatar

Stargazers

 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

depage-forms's Issues

need readonly attribute

How can we create an input field which is readonly. This allows to display fields in a form which are prefilled, and cannot be changed by the visitor.

But the subsequent processing of the form would handle these fields as any other.

We tried to use disabled => true. It seemed to work until we found out that by switching steps, disabled fields are cleared.

Get a Fatal Error when pushing the submit button.

( ! ) Fatal error: Call to undefined method clearValue in depage-forms/abstracts/element.php on line 99
Call Stack

Time Memory Function Location

1 0.0003 248752 {main}( ) ../elements.php:0
2 0.0091 1097904 depage\htmlform\htmlform->clearSession( ) ../elements.php:190
3 0.0091 1100440 clearValue ( ) ../htmlform.php:728
4 0.0091 1100624 depage\htmlform\abstracts\container->__call( ) ../htmlform.php:728
5 0.0091 1100696 depage\htmlform\abstracts\element->__call( ) ../container.php:78
6 0.0091 1100896 trigger_error ( ) ../element.php:99

add confirm-element to steps

Add a new confirm element to steps, that would display all data that the user provided. (See #4)
The user could confirm, or go back to previous steps to change some values.

Before displaying the data, we would calculate the hash of all previous data and when the user presses submit, we compare the saved values with the former hash. This way, we can make sure, that the data has not changed or edited in another window, the the user confirms everything what was displayed.

Need support for data confirmation page

We would like to have an intermediate page displaying the forms result and give the visitor the option to go back to the form or to confim the values for further processing.

It would be great if depage-forms supports this out of the box as part of the submission process.

Need support to provide an array with the form labels and fieldvalues

As of now we have getValues() which returns an array fieldname and value.

We would like to have one with field label and value which would allow us to easily create an HTML output to email the form result.

The function could be called getValuesWithLabel.

in particular the Single and Multiple should be supported such that also the values are converted to the same labels as shown in the form.

how can I make fields mandatory depending on another value

In the following form, I would like to make the subsequent fields mandatory only if user choses "folgende Anschrift"

How can I achieve this? I tried to register a validator in the fields but this only fires if user has entered something there.

And even if, how can I create a more specific message to tell the user, what is wrong.

screenshot_907

'0' is not an allowed input value for a number

A form that contains something like

$form->addNumber('number', array('label' => 'Number', 'required' => true, 'min' => 0, 'max' => 6, 'step' => 1));

does not accept the numerical value zero as input.

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.