Welcome Guest, Not a member yet? Register   Sign In
Form validation rule based on 3 fields
#1

[eluser]Jonas G[/eluser]
Hi all

I have a form with 3 fields: chance_1, chance_0 and chance_2. The sum of chose 3 needs to be exactly 100. What is the best way to do this?

Is it possible to have a callback function that takes 3 parameters? Is it even possible to put the VALUE of a field as the parameter of another fields' callback?

Is it possible to check this via the controller and then specifically calling the form_validation library to generate an error?

I hope to find a solid solution to the problem.

Regards
Jonas




Theme © iAndrew 2016 - Forum software by © MyBB