• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
smarty templates with form validation


I am struggling with using form validation and smarty. I have read a forum topic where two people said it was possible and required assigning the validation object to a smarty variable.

I am however struggling with how to do this.

Could someone provide me with some help.


Why would you want to do that?

Validation is done after the post of a form, in the controller, outside Smarty.

What I was looking for was getting the result of the validation into a smarty variable. I have managed to get the validation_string into a variable but I don't know how access the validation object so that I can get field specific errors.

Two options:

assign the validation result to a smarty template variable before loading the template, or create a smarty function that accesses the form validation library.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.