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: form_textarea in form_helper does not create specified 'rows' #3452

Closed
leo-at-itartpro opened this issue Aug 6, 2020 · 3 comments
Closed
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@leo-at-itartpro
Copy link

Describe the bug
A clear and concise description of what the bug is.

CodeIgniter 4 version
4.04

Affected module(s)
system/Helpers/form_helper.php
function form_textarea
lines 298 to 301

Expected behavior, and steps to reproduce if appropriate
when I create a textarea using echo form_textarea('text', set_value('text'), ['rows' => '5']);
I still get 10 rows...anyway for a quick fix is to change lines 298 to 301 from this:
$defaults = [
'name' => is_array($data) ? '' : $data,
'cols' => '40',
'rows' => '10',
];

to this:
$defaults = [
'name' => is_array($data) ? '' : $data,
'cols' => $extra['cols'] ?? '40',
'rows' => $extra['rows'] ?? '10',
];

Please consider this as I use the form helper a lot and my proposed quick-fix adds almost no overhead to system.

@leo-at-itartpro leo-at-itartpro added the bug Verified issues on the current code behavior or pull requests that will fix them label Aug 6, 2020
@paulbalandan
Copy link
Member

There is a fix for this in the latest develop branch. Can you pull that and check if that resolves your issue?

@michalsn
Copy link
Member

michalsn commented Aug 6, 2020

I believe it's fixed by #3415

@michalsn michalsn closed this as completed Aug 6, 2020
@leo-at-itartpro
Copy link
Author

Ah, sweet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

3 participants