• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Contact Form in different Pages

#1
[eluser]axelf[/eluser]
Hi,

I want to include the Contact Form with a partial view on different Pages of my Website. How can i validate this Form in One Central Place and the error Messages only One Time ? I don't want to Write the validation in every Controller were i want to show the Form.

#2
[eluser]niki_mihaylov[/eluser]
Hey,
make a partial view file with the form and include it where you need it. Then you can:
1) use ajax (most friendly solution)
2) Set the action="" attribute of the form to one controller where you will validate and you can redirect back to previous page or show message on that page. Also you can store error message in session flash_data if you like.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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