Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: How to restrict hidden input field in save() method.
Post: RE: How to restrict hidden input field in save() m...

kenjis Wrote: (12-20-2023, 12:54 AM) -- 1. You can specify an array of field names like $this->request->getPost(['field1', 'field2']). 2. It is better to validate all user input data. -- @"kenjis"...
836 Views
5 Replies
12-20-2023, 01:00 AM
sknair143
    Thread: How to restrict hidden input field in save() method.
Post: RE: How to restrict hidden input field in save() m...

@"kenjis" Thanks for your reply. Can you give a example. I'm new to codeigninter.
836 Views
5 Replies
12-20-2023, 12:48 AM
sknair143
    Thread: How to restrict hidden input field in save() method.
Post: How to restrict hidden input field in save() metho...

Hello Everyone, I have a from where i get some inputs from the user, i use same for for create and edit. In edit case i need to use hidden input field for some id reference purpose. But when i save...
836 Views
5 Replies
12-20-2023, 12:35 AM
sknair143
    Thread: set_value() is working but set_select() not working
Post: RE: set_value() is working but set_select() not wo...

Hello, @"sammyskills" If i move Code: -- -- top of every input it works everything. I think there is issue related to SESSION [hr] Hello, I got worked by using old() inst...
1,975 Views
13 Replies
09-08-2023, 02:08 AM
sknair143
    Thread: set_value() is working but set_select() not working
Post: RE: set_value() is working but set_select() not wo...

sammyskills Wrote: (09-08-2023, 12:34 AM) -- Put this in your controller, and echo it in your view: PHP Code: -- $oldSelect = $this->request->getOldInput('doc_type_id'); -- -- This also returnin...
1,975 Views
13 Replies
09-08-2023, 01:03 AM
sknair143
    Thread: set_value() is working but set_select() not working
Post: RE: set_value() is working but set_select() not wo...

sammyskills Wrote: (09-08-2023, 12:16 AM) -- sknair143 Wrote: (09-08-2023, 12:07 AM) -- If i use fill() method, how i can process the uploaded doc file ? -- Oh, I didn't notice that you used the g...
1,975 Views
13 Replies
09-08-2023, 12:17 AM
sknair143
    Thread: set_value() is working but set_select() not working
Post: RE: set_value() is working but set_select() not wo...

sammyskills Wrote: (09-08-2023, 12:13 AM) -- If the value is null, then that means that it is not being sent in the first place. Try adding this in your controller, before the checks, to see what you...
1,975 Views
13 Replies
09-08-2023, 12:14 AM
sknair143
    Thread: set_value() is working but set_select() not working
Post: RE: set_value() is working but set_select() not wo...

sammyskills Wrote: (09-07-2023, 11:56 PM) -- Can you confirm by adding the code below, somewhere in your code, and run the validation again? PHP Code: -- -- Just to confirm that the value ...
1,975 Views
13 Replies
09-08-2023, 12:07 AM
sknair143
    Thread: set_value() is working but set_select() not working
Post: RE: set_value() is working but set_select() not wo...

InsiteFX Wrote: (09-07-2023, 10:26 PM) -- Your problem is your passing an object array to the view from find not an associated array PHP Code: -- // so to access just use:
1,975 Views
13 Replies
09-07-2023, 11:12 PM
sknair143
    Thread: set_value() is working but set_select() not working
Post: RE: set_value() is working but set_select() not wo...

sammyskills Wrote: (09-07-2023, 08:11 AM) -- What exactly are you trying to achieve? And why not show your controller code also? -- Controller : Code: -- public function createDocument...
1,975 Views
13 Replies
09-07-2023, 09:28 PM
sknair143
    Thread: set_value() is working but set_select() not working
Post: set_value() is working but set_select() not workin...

Hello, I'm trying to use set_value() and set_select(), Everything is correct but set_select() is not working. Form : Code: --                     Select                                         ...
1,975 Views
13 Replies
09-07-2023, 06:07 AM
sknair143
    Thread: Call to a member function humanize() on string
Post: Call to a member function humanize() on string

Hi, I'm getting the error when i humnize() a datetime string from my database. same working for created_at field but not working for doc_expiry_date Code: --   -- Date : Code: -- 2023-...
390 Views
1 Replies
09-07-2023, 12:18 AM
sknair143
    Thread: Validation rule not working for file.
Post: Validation rule not working for file.

Hello, I have a simple  dynamic form with 4 inputs including one hidden input.  here i use validation rule for array data because we can't predict how many fields will be added in future.  I use r...
410 Views
1 Replies
09-06-2023, 10:25 PM
sknair143
    Thread: Handling Multiple input with same field name as array. and show valdiation error
Post: RE: Handling Multiple input with same field name a...

sammyskills Wrote: (09-06-2023, 05:46 AM) -- 1. Are you validating in both the model and controller? 2. Within your controller, you do not need to load the validation library again. It is already ...
1,076 Views
7 Replies
09-06-2023, 05:50 AM
sknair143
    Thread: Handling Multiple input with same field name as array. and show valdiation error
Post: RE: Handling Multiple input with same field name a...

sammyskills Wrote: (09-06-2023, 05:38 AM) -- With the code you have, if you print_r or var_dump the errors session variable, you should able to get the "index" associated with the error message. So, ...
1,076 Views
7 Replies
09-06-2023, 05:41 AM
sknair143
    Thread: Handling Multiple input with same field name as array. and show valdiation error
Post: RE: Handling Multiple input with same field name a...

Check this : Code: --         $documents = new \App\Entities\DocumentsEntity;         $doc_model = new DocumentsModel;         $validation = \Config\Services::validation();         if...
1,076 Views
7 Replies
09-06-2023, 05:38 AM
sknair143
    Thread: Handling Multiple input with same field name as array. and show valdiation error
Post: Handling Multiple input with same field name as ar...

Hello, I'm developing an employee management system, where i have to upload employee documents such as passport, id, etc... may be more documents in future. So i can't make static input fields. Every...
1,076 Views
7 Replies
09-06-2023, 03:27 AM
sknair143
    Thread: Codeigniter 4 REST API
Post: Codeigniter 4 REST API

Hi Everyone, I wanted to ask you is there any libraries or anything we can use to build secure api in CI quickly. ? Please share your suggestions. For now im doing something like this. Employ...
673 Views
1 Replies
09-05-2023, 01:04 AM
sknair143
    Thread: How to set old() to the dropdown menu ?
Post: RE: How to set old() to the dropdown menu ?

sammyskills Wrote: (09-05-2023, 12:23 AM) -- You need to add the value to check for after the field name, like so: PHP Code: --
1,175 Views
4 Replies
09-05-2023, 12:27 AM
sknair143
    Thread: How to set old() to the dropdown menu ?
Post: RE: How to set old() to the dropdown menu ?

sammyskills Wrote: (09-04-2023, 11:27 PM) -- You will need to use the set_select() form helper. See docs (https://codeigniter4.github.io/CodeIgniter4/helpers/form_helper.html#set_select) PS: If yo...
1,175 Views
4 Replies
09-05-2023, 12:11 AM
sknair143

Theme © iAndrew 2016 - Forum software by © MyBB