• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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 the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply

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

#5
(03-13-2018, 07: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.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply

#6
Yes, it not work.
Thanks
Reply

#7
Hi,

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

 
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.