[eluser]soupdragon[/eluser]
That the validation rules are quite simply not being run - no error is password fields dont match, no errors if required fields missing completely or to short / long
[eluser]TheFuzzy0ne[/eluser]
OK, Can you post your view?
[eluser]soupdragon[/eluser]
tried the EDIT removing seller bit - no change
View
Code: <h1 align="left">Shop eröffnen<br /></h1>
<br />
<? $attributes = array('class' => 'email', 'id' => 'seller_reg');?>
<?=form_open('seller/seller_reg', $attributes); ?>
<fieldset class="sellerreg">
<legend class="sellerreg">Seller werden</legend>
<?=(!empty($this->validation->error_string)) ? $this->validation->error_string.'<br><br>' : ''; ?>
<div class="formLayout">
<? foreach ($form as $what => $do) { ?>
<div class="testing">
<label class="reg" style="width: 200px; float: left;"><?=ucfirst($do['fields']['label']);?> <? switch($what) {
case 'seller_name':
case 'seller_password':
case 'passconf':
case 'email':
echo '<span style="color:#FF0000">*</span> <br />';
break;
} ?>
</label>
<span style="width: 160px; float: left;">
<? foreach ($do['show'] as $thetype => $details) {
$call = 'form_'.$thetype; ?>
<? switch($thetype) {
case 'dropdown': ?>
<?=$call($details['name'], $details['array'], $details['selected']);?>
<? break;
case 'radio':
$js = 'onFocus="blur()"';
foreach($details as $nr => $radio) {?>
<?=ucfirst($radio['value'])?><?=$call($radio,'','', $js);?><br />
<? }
break;
default: ?>
<?=$call($details);?>
<? break;
}
?></span> <br />
<? } ?>
</div>
<? } ?>
</div>
<img src="<?=($base.'img/')?>random.php?<?=rand(24,101)?>" alt="CAPTCHA image" width="60" height="20" vspace="1" align="top" /> -->
<br />
<br />
<div><? echo form_submit('mysubmit', 'abschicken!'); ?></div>
<br /><br />
<p style="color:#FF0000" align="right">* fields required</p>
</fieldset>
<?=form_close();?>
[eluser]gafro[/eluser]
Code: 'Seller/seller_reg' => array(
array(
'field' => 'seller_name',
'label' => 'lang:seller_name',
'rules' => 'trim|required|min_length[4]|max_length[12]|xss_clean|callback_username_check'
),
array(
'field' => 'seller_password',
'label' => 'lang:seller_password',
'rules' => 'trim|required|matches[passconf]|xss_clean'
),
array(
'field' => 'passconf',
'label' => 'lang:passconf',
'rules' => 'trim|required|xss_clean'
),
array(
'field' => 'firmname',
'label' => 'lang:firmname',
'rules' => 'trim|required|xss_clean'
),
array(
'field' => 'firstname',
'label' => 'lang:firstname',
'rules' => 'trim|required|xss_clean'
), <---------
);
comma shouldn't be there?
[eluser]TheFuzzy0ne[/eluser]
There seems to be a lot of funkiness going on in your view. I can't follow it. I'd like to suggest you save that view, and start a fresh with keeping everything simple in mind.
[eluser]gafro[/eluser]
I second that. Front end needs as much separation as back end. Separate your CSS and JS please
[eluser]cindor[/eluser]
[quote author="soupdragon" date="1236629585"]tried the EDIT removing seller bit - no change
View
Code: <h1 align="left">Shop eröffnen<br /></h1>
<br />
<? $attributes = array('class' => 'email', 'id' => 'seller_reg');?>
<?=form_open('seller/seller_reg', $attributes); ?>
<fieldset class="sellerreg">
<legend class="sellerreg">Seller werden</legend>
<?=(!empty($this->validation->error_string)) ? $this->validation->error_string.'<br><br>' : ''; ?>
<div class="formLayout">
<? foreach ($form as $what => $do) { ?>
<div class="testing">
<label class="reg" style="width: 200px; float: left;"><?=ucfirst($do['fields']['label']);?> <? switch($what) {
case 'seller_name':
case 'seller_password':
case 'passconf':
case 'email':
echo '<span style="color:#FF0000">*</span> <br />';
break;
} ?>
</label>
<span style="width: 160px; float: left;">
<? foreach ($do['show'] as $thetype => $details) {
$call = 'form_'.$thetype; ?>
<? switch($thetype) {
case 'dropdown': ?>
<?=$call($details['name'], $details['array'], $details['selected']);?>
<? break;
case 'radio':
$js = 'onFocus="blur()"';
foreach($details as $nr => $radio) {?>
<?=ucfirst($radio['value'])?><?=$call($radio,'','', $js);?><br />
<? }
break;
default: ?>
<?=$call($details);?>
<? break;
}
?></span> <br />
<? } ?>
</div>
<? } ?>
</div>
<img src="<?=($base.'img/')?>random.php?<?=rand(24,101)?>" alt="CAPTCHA image" width="60" height="20" vspace="1" align="top" /> -->
<br />
<br />
<div><? echo form_submit('mysubmit', 'abschicken!'); ?></div>
<br /><br />
<p style="color:#FF0000" align="right">* fields required</p>
</fieldset>
<?=form_close();?>
[/quote]
form_validation class has changed with CI 1.7.0.
try changing Code: <?php echo validation_errors(); ?>
instead of
Code: (!empty($this->validation->error_string)) ? $this->validation->error_string.'<br><br>' : '';
[eluser]soupdragon[/eluser]
well cant see that make a great deal of difference but here is what it produces.
Code: <?=(!empty($this->validation->error_string)) ? $this->validation->error_string.'<br><br>' : ''; ?>
<form action="seller/seller_reg" method="post" class="email" id="seller_reg"><fieldset class="sellerreg">
<legend class="sellerreg">Seller werden</legend>
<div class="formLayout">
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Username <span style="color:#FF0000">*</span> <br /></label>
<span style="width: 160px; float: left;">
<input type="text" name="seller_name" value="" id="seller_name" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Password <span style="color:#FF0000">*</span> <br /></label>
<span style="width: 160px; float: left;"><input type="password" name="seller_password" value="" id="seller_password" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Password Confirmation <span style="color:#FF0000">*</span> <br /></label>
<span style="width: 160px; float: left;"><input type="password" name="passconf" value="" id="passconf" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Firmen name </label>
<span style="width: 160px; float: left;">
<input type="text" name="firmname" value="" id="firmname" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Vorname </label>
<span style="width: 160px; float: left;">
<input type="text" name="firstname" value="" id="firstname" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Nachname </label>
<span style="width: 160px; float: left;">
<input type="text" name="lastname" value="" id="lastname" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Str. </label>
<span style="width: 160px; float: left;">
<input type="text" name="street" value="" id="street" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Plz </label>
<span style="width: 160px; float: left;">
<input type="text" name="plz" value="" id="plz" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Stadt </label>
<span style="width: 160px; float: left;">
<input type="text" name="city" value="" id="city" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Email Address <span style="color:#FF0000">*</span> <br /></label>
<span style="width: 160px; float: left;">
<input type="text" name="email" value="" id="email" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Telefon </label>
<span style="width: 160px; float: left;">
<input type="text" name="tel" value="" id="tel" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Handy </label>
<span style="width: 160px; float: left;">
<input type="text" name="handy" value="" id="handy" maxlength="100" size="50" style="width:40"> </span> <br />
</div>
<div class="testing">
<label class="reg" style="width: 200px; float: left;">Typ </label>
<span style="width: 160px; float: left;">
Privat<input type="radio" name="type" value="privat" id="type" style="margin:10px"><br />
Firma<input type="radio" name="type" value="firma" id="type" style="margin:10px"><br />
</span> <br />
</div>
</div>
[eluser]soupdragon[/eluser]
ha ! cindor you're a hero !!!!!
i knew it was something stupid caused by the update !
Thats it !!!
Thanks a million .....can now get on with converting the other 10 forms :-)
[eluser]TheFuzzy0ne[/eluser]
Nice one. I totally missed that, sorry for taking you on a joy ride in the opposite direction to where you wanted to go.
|