![]() |
set_value() is working but set_select() not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: set_value() is working but set_select() not working (/showthread.php?tid=88432) Pages:
1
2
|
RE: set_value() is working but set_select() not working - sknair143 - 09-08-2023 (09-08-2023, 12:16 AM)sammyskills Wrote:(09-08-2023, 12:07 AM)sknair143 Wrote: If i use fill() method, how i can process the uploaded doc file ? I want to move to the local folder and save the path into the doc_file field in database, that i can manage to do but im in trouble with set_select() function. I didnt understand what is making wrong, everything seems to be correct. RE: set_value() is working but set_select() not working - sammyskills - 09-08-2023 Put this in your controller, and echo it in your view: PHP Code: $oldSelect = $this->request->getOldInput('doc_type_id'); RE: set_value() is working but set_select() not working - sknair143 - 09-08-2023 (09-08-2023, 12:34 AM)sammyskills Wrote: Put this in your controller, and echo it in your view: This also returning NULL This also returning NUL Code: $oldSelect = $this->request->getOldInput('no'); I figure it out something, When i move the select box to second position it works but now the first inputbox (Doc no) not working. Code: <?php echo form_open_multipart('') ?> I think the issue with SESSION RE: set_value() is working but set_select() not working - sknair143 - 09-08-2023 Hello, @sammyskills If i move Code: <?= session()->has('errors') ? session('errors.no') : ''; ?> top of every input it works everything. I think there is issue related to SESSION Hello, I got worked by using old() instead of set_value(). But i can't figure it out why its not worked before. Below code is working Code: <?php echo form_open_multipart('') ?> Anyone know what was the problem with set_value() ? |