Welcome Guest, Not a member yet? Register   Sign In
validation and input field has text
#1

[eluser]Mitja B.[/eluser]
I have small problem and i do not know if this is possible.

i validate with CI validation. Everything ok and works, but fileds that are not required are not validate. After page is refresh validate fields still havse text in it other fields are empty. Is it possible that even this fields have text even they are not validate.

Redna: &lt;input type="text" name="price_eur" value="&lt;?= $row-&gt;price_eur?&gt;" /><br>
SiMobil: &lt;input type="text" name="price_eur_simobil" /&gt;

SiMobil field lost text after validating.

Thx, hope undesrtand me
#2

[eluser]Michael Wales[/eluser]
SiMobil lost it's text because you are not telling it to place any text there. Something like:

Code:
&lt;input type="text" name="price_eur_simobil" value="&lt;?= $this-&gt;validation->price_eur_simobil; ?&gt;" />

Would work, as long as you have defined that field within the set_fields() method of the Validation class. Otherwise, just do:

Code:
&lt;input type="text" name="price_eur_simobil" value="&lt;?= $this-&gt;input->post('price_eur_simobil'); ?&gt;" />




Theme © iAndrew 2016 - Forum software by © MyBB