Welcome Guest, Not a member yet? Register   Sign In
Display form results on same page as form (allowing to quickly edit)
#7

[eluser]mfroseth[/eluser]
[quote author="Cristian Gilè" date="1338839676"]You can populate a form input as follows:

[code
$data = array(
'name' => 'username',
'id' => 'username',
'value' => set_value('username',$username)
);

echo form_input($data);[/code]

where $username is a value passed from the controller to the view.[/quote]
Thanks for all the help. I've attempted this with the following code:
Code:
<?php
if($this->session->userdata('plan_type') == "graded") { $plan = "Graded"; } else { $plan = "Level";
$options =
array('default' =>'Select A Plan',
    'graded' => 'Final Expense Graded Death Benefit',
    'level' => 'Final Expense Level Death Benefit',
    'value' => set_select('plan_type', $plan)
    );
?>
    <?php echo form_dropdown('plan_type', $options); ?>

Am I doing something wrong? Seems to only add a blank option to the select menu.


Messages In This Thread
Display form results on same page as form (allowing to quickly edit) - by El Forum - 06-04-2012, 01:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB