gajus / gajus/dora

Reply PHP form generation/handling library

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
72
Forks
6
PR merge metrics
No merged PRs in 30d

Description

I carefully looked at the use of Dora document, and thick at its source. I think can add like this method:

``` php
class Form implements \Psr\Log\LoggerAwareInterface {
public function select($name, $options, ...) {
$this->input($name, null, $options);
}

public function add($input) {
$this->_elements[$input->name] = $input;
}

public function render() {
foreach($this->_elements[$input->name] as $element) {
echo $element;
}
}
}
```

It's will be more friendly.

```
And, You can refer to the form of other existing framework features, For example, validator:
```

``` php
if (!$form->validate($_POST)) {
foreach ($form->getMessages() as $field => $message) {
echo $message, '
';
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.