0

I'm just trying to find a pattern / best practice to come up with interactive user decisions. So basically I have a (quite large) form the user has to fill. Once he submits, an AJAX-Post-Request is sent to the server. At first some fault checks are done there but some checks require user interaction e.g. "Is this really correct". As the returned "document" is always XML I thought of returning all questions at once like bla bla2 And then iterating through them. Ohh, I'm using JQuery and the Bootstrap' modal therefore. And if all these questions are answered with yes I'll send the form again with a parameter allyes=true or something.

However, I don't feel very happy with that and I'm just wondering if there are some easier ways to code that.

Best regards, fire

wjentner
  • 525
  • 1
  • 7
  • 16

1 Answers1

1

From a users perspective, it's better if the form tells you there is a problem as you go along, rather than having filled it all in. If the checks are field level, I'd be tempted to validate each one as they are filled in.

SteveP
  • 18,840
  • 9
  • 47
  • 60
  • These type of fault checks are already handled like this. But there are some checks that require combined information and also need some hard SQL-queries in the backend. I just want to keep these sort of queries low and so just do the check on submit. – wjentner Mar 04 '13 at 21:43
  • In which case, your approach looks fine to me. What aspects are you unhappy with ? – SteveP Mar 04 '13 at 21:49
  • I've just wondered if there is an easier way to handle things like this. One often discards the obvious things ;) But okay, I will do it like that :) Thank you very much! :) – wjentner Mar 04 '13 at 22:01