[eluser]mariowarner[/eluser]
[quote author="mistress_shiira" date="1193406820"]
Quote:<div style="font: 12px normal Verdana;color:red;">
<?php
if($this->validation->error_string){
echo $this->validation->error_string;
echo "enable_button();";
}
?>
</div>
hey guys can you help me with this?
i have a simple sign up form..when the user submits the form and there is still a validation error, i want the submit button to be enabled.the submit button was disabled on load fyi.
the code above doesnt seem to work...[/quote]
hi,
you probably have already solved this problem but i'd like to share my experience for others who had the same problem.
i think the problem has to do with where the error_string shows up. if you write it somewhere inside the form (right after the opening < form >
, it disables the buttons (submit/reset/etc).
i had the same problem just now when i placed the "echo $this->validation->error_string;" show up inside the form. when i moved it outside of the form, the buttons become enabled again without any need to make additional scripts.
hth.