Welcome Guest, Not a member yet? Register   Sign In
Dropdown not getting validated
#11

[eluser]CroNiX[/eluser]
I usually use:
$options[0] = 'Select an Option';
for a default value, and
'is_natural_no_zero' for the rule.
#12

[eluser]xtremer360[/eluser]
What do I need to do about it so that if that nothing is chosen then it gives the error.
#13

[eluser]CroNiX[/eluser]
Try what I suggested in my previous post.
#14

[eluser]xtremer360[/eluser]
That didn't work. All that did was make it an option to add and I tested it out and it didn't even give any error.
#15

[eluser]xtremer360[/eluser]
Any other suggestions because I'm still stuck on this issue?
#16

[eluser]CroNiX[/eluser]
Don't know, sorry. I never use multiple select dropdowns as a lot of people don't know how to use them, so I use checkboxes for that kind of multiple selection. I know the regular dropdowns work just fine with validation.
#17

[eluser]xtremer360[/eluser]
I'm hoping someone will know and help me out. Thank you though.
#18

[eluser]xtremer360[/eluser]
Here's what I have for my current view code for the muliselect.

Code:
<div class="section _100">
&lt;?php echo form_label('Recipient', 'recipient'); ?&gt;
&lt;?php
$options = array();
$options[] = 'Select an Option';
foreach($users AS $user)
{
    $options[$user->userID] = $user->firstName.' '.$user->lastName;
}
?&gt;
<div>&lt;?php echo form_multiselect('recipient[]', $options, ' ', 'class="required"'); ?&gt;</div>
</div>
#19

[eluser]xtremer360[/eluser]
I tried working with it more and trying to figure it out on my own but I'm just having no luck. Any ideas?
#20

[eluser]xtremer360[/eluser]
Issue was solved. I had to place class="validate" inside the form open tag as well and not just the dropdown itself.




Theme © iAndrew 2016 - Forum software by © MyBB