Welcome Guest, Not a member yet? Register   Sign In
Repopulating form according to a condition
#1

[eluser]Ci beginner[/eluser]
Hi there,

I got a form that obviously uses form_validation from CodeIgniter. If it pass the form_validation, it will save the info the DB, show success page, etc etc.

If it fails, it will show the page, repopulating the entered values and also the error messages. But we have an issue here. If the user didn't type something, it will show the form with no info. If you go to preferences (for example), normal use will show you your current preferences. On this way, we can't show any preferences because we try to show the populated value (that never was populated).

What can I do?

Thank you!
#2

[eluser]alboyd[/eluser]
Do you mean you want to have a form that acts as an UPDATE rather than an ADD? In other words the form should show the current values on load rather than just empty fields?




Theme © iAndrew 2016 - Forum software by © MyBB