• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Prepopulate form data issue

#2
[eluser]cahva[/eluser]
Hmm.. Dont know why you took the trouble of extending the form validation class as you could easily do that with the default setup using the second parameter for set_value:
Code:
<?=form_input(array('name' => 'name', 'id' => 'name'), set_value('name',$row->client_name)) ?>

With that it will first put the default value from db and after submitting the form, it will use posted items. And as always, its good practise to use redirect on successfull submission(update db && redirect to same page for example).


Messages In This Thread
Prepopulate form data issue - by El Forum - 07-13-2010, 10:42 AM
Prepopulate form data issue - by El Forum - 09-14-2010, 10:57 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.