Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Form Validation

edited July 2014 in Framework

I'm experiencing a problem with the server-side form validation on mobile. The validation works fine on desktop browsers but fails miserably on mobile. None of the input validation failed considering there's only one input present and it definitely is not empty. I checked it myself multiple times.

Am I missing something important? I can't resort to workarounds since there are succeeding forms that use the same method.

Comments

  • edited July 2014

    To add to this discussion, the submit method returns an error "Cross-site request forgery detected".

  • I managed to fix the problem by getting rid of the sessions. Still, it still baffles me that the code managed to execute a CSRF on a mobile platform (on both Android and iOS).

  • Strange, but a simple form (see link below) works fine for me in Safari, Chrome, and Opera Mini on iOS. If you can provide a sample of the form that's not working, that might help figure out what's going on.

    https://gist.github.com/jbroadway/10c672bb2421e1167957

  • I used something like this:

    if($form -> submit()) { //pass POST variables to another page } else { //display template }

    It's a payment processing app hence the POST variables getting passed around to avoid bypassing the flow. I'll try to provide a link to the app when it's finalized so you can check what might've caused it.

Sign In or Register to comment.