[SOLVED] Callback Error Message Not Showing Where Should Be |
[eluser]riwakawd[/eluser]
I am having trouble with my call back error message it is not showing up where it should be. It should be showing up above the first input. Were all call back go. But for some reason the call back goes on the same line as the form_error. I need it all call backs to go where my if error message section is. How do i fix my call back to get what I am after. My View Note: form action does not display on here. Code: <form acti echo base_url('install/step_3a');?>" method="post" enctype="multipart/form-data" class="form-horizontal"> My Controller Code: <?php
[eluser]Tim Brownlaw[/eluser]
Well you are relying on if($error_warning) to evaluate to TRUE or False Does it? It seems to be coming back as False which would be the case if I have understood your issue correctly.. Does it get set to anything? Anything inside an if(...) has to evaluate to Either True or False. At a guess you need to be testing for it Not being set to an empty string. Code: if($error_warning != '' ) To see what it is doing - do a var_dump($error_warning) and test it for when it should show errors and when it shouldn't. Next part: If you want to have all the errors appear at the top - why not use the inbuilt validation_errors()? ie Code: <?php echo validation_errors(); ?>
[eluser]riwakawd[/eluser]
I have got it all working with custom library called request. Which also built in xss_clean. All works perfect now. Code: <?php
[eluser]CroNiX[/eluser]
If you used the validation library properly you would probably only need about 1/2 the code you are currently using and won't keep having these problems.
[eluser]Tim Brownlaw[/eluser]
I'm not sure why you are not using the Validation Library... I'd suggest that it'd be a really good idea to give this a really good read... http://ellislab.com/codeigniter/user-gui...ation.html You've missed one tiny piece of the puzzle, given up and re-invented the wheel! Did you at least try what I suggested in my previous post??????? |
Welcome Guest, Not a member yet? Register Sign In |