Welcome Guest, Not a member yet? Register   Sign In
Pre-populate update form with data from the database
#2

Hi,

See the note here

So you need to pass your first mane as a default value like this:


PHP Code:
<?php echo form_input('first_name''', [
 
          'type'  => 'text',
 
          'id'    => 'first_name',
 
          'class' => 'form-control',
 
          'value' => set_value($customer->first_name,isset($customer->first_name)?$customer->first_name:''),
 
          'placeholder' => 'First name',
 
  ]);
?>
A good decision is based on knowledge and not on numbers. - Plato

Reply


Messages In This Thread
RE: Pre-populate update form with data from the database - by salain - 08-10-2017, 10:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB