Welcome Guest, Not a member yet? Register   Sign In
function old() not allow input name type array
#1

Hi.

PHP Code:
<input id="meta[full_name]" name="meta[full_name]" placeholder="Full name" value="<?= old('meta[full_name]'); ?>" type="text" class="form-control "

After post, it not store old input data from form, because it store in $_SESSION['_ci_old_input']['post'] type array.

How to get old data from input name type array.
Thanks all
Reply
#2

Hi
And i try name = meta.full_name not accept.
I debug, it replace meta.full_name to meta_full_name

Tks
Reply
#3

form_helper set_value
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

It no affect, i use redirect()->back()->withInput(); redirect page
Reply
#5

(03-13-2018, 06:07 PM)HTLove Wrote: Hi.

PHP Code:
<input id="meta[full_name]" name="meta[full_name]" placeholder="Full name" value="<?= old('meta[full_name]'); ?>" type="text" class="form-control "

After post, it not store old input data from form, because it store in $_SESSION['_ci_old_input']['post'] type array.

How to get old data from input name type array.
Thanks all

I barely have time to breathe with the couple of jobs I'm working that are nearing deadlines currently, but I believe I finally implemented that a month or two ago where you can access it in "dot array" notation. So, it would be like:

Code:
old('meta.full_name')

If that doesn't work, though, please raise an issue at GitHub so I remember to implement that when I have a chance to surface in a couple of weeks.
Reply
#6

Yes, it not work.
Thanks
Reply
#7

Hi,

it is fixed.
You can use old('meta.full_name') as kilishan said.

 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB