Welcome Guest, Not a member yet? Register   Sign In
[need some help] TWO Question about set_* values to a failure Form Validation
#1

[eluser]Unknown[/eluser]
Hello everyone,

1.

In my 'VIEW' I used
Code:
<?php echo form_checkbox('checkbox'); ?>
to make the CheckBox.
IF the form fails validation when submit. How can I use 'set_checkbox' to set the value back to the CheckBox?

2.
In my 'Controller'
Code:
$sec_array = array(
        ''        =>        '- Select a Question -',
        'What is the first name of your favorite uncle?'        =>        'What is the first name of your favorite uncle?',
        'Where did you meet your spouse?'        =>        'Where did you meet your spouse?',
        'What is your oldest cousin's name?'        =>        'What is your oldest cousin's name?',
);
$vars['sec'] = form_dropdown('sec', $sec_array, '0', 'id="sec");
In my 'VIEW' I used
Code:
<?php echo $sec; ?>
to make the DropDownList.

When submit validate fails. How can I use 'set_select' to set the value on the DropDownList?


Thanks a lot.




Theme © iAndrew 2016 - Forum software by © MyBB