I used formigniter to create a form for CI. http://formigniter.org/
This bit works great. However, I want to set a default value for the name field.
The input code is as follows:
<label for="forename">Forename</label>
<?php echo form_error('forename'); ?>
<br /><input id="forename" type="text" name="forename" maxlength="255" value="<?php echo set_value('forename'); ?>" />
and I would like to add a name with $this->session->userdata('current_client');
Will it break my database insert if I just go into the set_value function?
Edit:
Sorry, I don’t think it was very clear there. I want the name field to be automatically populated with the name from the session cookie.
source
share