php - Validating form with jquery(ajax), problem with captchas -


well bit stuck on using jquery, ajax , zend framework combined. found tutorial http://www.zendcasts.com/ajaxify-your-zend_form-validation-with-jquery/2010/04/, made tests , got working, problem captcha value changes every post request(also csrf token), how check validation on data forms not on captcha fields ?

currently have thought use method isvalidpartial() , redesign form.

i've looked tutorial. file index.phtml, validating section of code

function dovalidation(id) {     var url = '/index/validateform'     var data = {};     $("input").each(function()     {         data[$(this).attr('name')] = $(this).val();     });     $.post(url,data,function(resp)     {         $("#"+id).parent().find('.errors').remove();         $("#"+id).parent().append(geterrorhtml(resp[id], id));     },'json'); } 

you see, line

$("input").each(function() { ... }) 

is walking on form inputs grab data them (and send validation then). selector "input", need rewrite wouldn't match captcha element. don't know html rendered form in application, considering form inputs have "id" attribute, can change selector "input[id!=captcha_input_id]", 'captcha_input_id' id of input skip.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -