Welcome Guest, Not a member yet? Register   Sign In
set_value() is working but set_select() not working
#6

(This post was last modified: 09-08-2023, 12:03 AM by sammyskills.)

Can you confirm by adding the code below, somewhere in your code, and run the validation again?

PHP Code:
<?= set_value('doc_type_id'?>

Just to confirm that the value is returned to the form if validation fails.

PS:

I see that you are using Entity Classes in your controller (DocumentsEntity).

Instead of adding the properties individually, you can use the fill() method to have the properties filled automatically for you, like so:

PHP Code:
$document = new DocumentsEntity();
$document->fill($this->request->getPost()); 

See docs.
Reply


Messages In This Thread
RE: set_value() is working but set_select() not working - by sammyskills - 09-07-2023, 11:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB