Skip to content
Advertisement

Facing issue while using set_value() function in form_validation library in Codeigniter

I am using form_validation library in Codeigniter, I am facing an issue while using set_value() function.

It not sets the value when an error occure in form validation. Here is my form ==>

JavaScript

Here is my Controller code ==>

JavaScript

Here I am attaching an image of the output. It does not show the previous entered value.

an empty textboxt with error message

Advertisement

Answer

Use set_value() as the value of value attribute

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement