Re: $this->Ajax->Form Question to avoid double submit

2011-05-04 Thread heohni
@Taffarel de Lima yes, this works much better, thanks!!! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group,

Re: $this->Ajax->Form Question to avoid double submit

2011-05-03 Thread Taffarel de Lima
dude try to use this plugin of jquery instead the Ajax helper. http://jquery.malsup.com/form/ 2011/5/3 heohni > Another update: > > I added a class name to the form > > > And changed the jquery to > $('.cForm').submit(function() { > > But there is still no difference :-( > Still 2 submits. > >

Re: $this->Ajax->Form Question to avoid double submit

2011-05-03 Thread heohni
Another update: I added a class name to the form And changed the jquery to $('.cForm').submit(function() { But there is still no difference :-( Still 2 submits. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http:

Re: $this->Ajax->Form Question to avoid double submit

2011-05-03 Thread heohni
Forgot to update: Ajax->Form('comment', 'post', array('update' => 'msg', 'url' => array('action' => 'comment')), false); ?> I added the false statement, which gives me the following html block: But the comment call is still perforemd twice... -- Our newest site for the community: CakePHP Vide

$this->Ajax->Form Question to avoid double submit

2011-05-03 Thread heohni
Hi, I have a form like this: Ajax->Form('comment', 'post', array('update' => 'msg', 'url' => array('action' => 'comment'))); ?> Ajax->Form->end(); ?> Using jquery I use this function: $('#submitcomment').click(function() { if($("#comm").val().length < 20) { alert('too short');

Form question

2009-03-01 Thread Toby Mathews
Hi there, I'm pretty new to CakePHP and I think this is probably a very simple problem, but I'm not sure where I am going wrong. I am working on the add view for one of my models - Model1. The model belongsTo another model (Model2), which in turn belongsTo a third model (Model3). On the add

Re: Validation Question/Form Question

2008-11-25 Thread teknoid
first you need allowEmpty => true for your radio buttons then, you simply need a custom validation rule for the 'other' field 'other => array('rule'=>array('checkOther')); function checkOther() { if(///check if radio buttons are empty && 'other' is not decimal///) { return false; } re

Validation Question/Form Question

2008-11-25 Thread rgreenphotodesign
I find myself a little stumped on this one, maybe some can offer some insight. I need a "donate" form that will be sent via SSL to our merchant processing facility. I need a set of radio buttons that have a suggested donation amount (accomplished using form->radio('Amount', array('1000.00' =>'$10

Re: Ajax form question

2007-02-11 Thread bernardo
On Feb 9, 11:54 am, "MrTufty" <[EMAIL PROTECTED]> wrote: > The part I'm having trouble with is redirection from an Ajax form. The > way I understand it is if I do the redirection in the controller > actions the way I normally would, only the Ajax div will be getting > updated, which is not what

Ajax form question

2007-02-09 Thread MrTufty
Hi guys, thought I'd throw this out here because I simply can't get my head around it. I currently have user authentication working on my site, after my problems the other day with validation. I'm happy with the way that works, except for one thing. In the header of my site I have a couple of li