Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG in form_hidden with associative array #1244

Closed
bvrignaud opened this issue Sep 26, 2018 · 0 comments
Closed

BUG in form_hidden with associative array #1244

bvrignaud opened this issue Sep 26, 2018 · 0 comments

Comments

@bvrignaud
Copy link
Contributor

There is a bug in the form_hidden function declaration.

In the documentation (https://bcit-ci.github.io/CodeIgniter4/helpers/form_helper.html?highlight=form#form_hidden) we can read :
You can either submit a name/value string to create one field:

form_hidden('username', 'johndoe');
// Would produce: <input type="hidden" name="username" value="johndoe" />

... or you can submit an associative array to create multiple fields:

$data = array(
        'name'  => 'John Doe',
        'email' => 'john@example.com',
        'url'   => 'http://example.com'
);

echo form_hidden($data);

But the second way doesn't works.

The second parameters ($value) must have a default value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant