Welcome Guest, Not a member yet? Register   Sign In
smarty templates with form validation
#1

[eluser]prestondocks[/eluser]
Hi,

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.

Thanks
Simon
#2

[eluser]WanWizard[/eluser]
Why would you want to do that?

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

[eluser]prestondocks[/eluser]
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.
#4

[eluser]WanWizard[/eluser]
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.




Theme © iAndrew 2016 - Forum software by © MyBB