I'm actually having the exact same problem as the OP with this one, except my
code works just fine - I can validate the form no problem, I just can't get
it to validate on a tab that loads behind the currently selected one.
I am lazy loading my tabs like:
<?= $this->contentPane('new-record', '', array('title' =>
$this->titles['new-title'], 'class' => 'tab', 'href' =>
"/record/new/format/ajax", 'parseOnLoad' => true)) ?>
because it lets me use $this-> correctly, but it also breaks the Javascript
I put in the view, like it just never gets called.
I'm scratching my head to think of a way around this in Zend. Anyone got the
same problem?
vladimirn wrote:
>
> So, are we back from conference? :)
>
> vladimirn wrote:
>>
>> Ah :)
>> I would like i am there :)
>> Have a nice time :)
>>
>> Matthew Weier O'Phinney-3 wrote:
>>>
>>> -- vladimirn <[EMAIL PROTECTED]> wrote
>>> (on Wednesday, 17 September 2008, 08:11 AM -0700):
>>>>
>>>> Anyone? :(
>>>
>>> Sorry, a lot of us are at ZendCon this week. ;)
>>>
>>>>
>>>>
>>>> vladimirn wrote:
>>>> >
>>>> > Hello all,
>>>> > is anyone here able to help about form validation please?
>>>> > After pressing submit button expected behaviour is stopping form
>>>> > submission if checkbox is not checked.
>>>> >
>>>> > I have a bunch of stuffs in my form.
>>>> > So far, checkbox validation wont work.
>>>> > $agreements->addElement ( 'CheckBox', 'ages', array ('required' =>
>>>> true,
>>>> > 'label' => 'I\'m Over 18 years old') )
>>>> >
>>>> > Submit button:
>>>> > $footer->addElement ( 'SubmitButton', 'submit', array ('label' =>
>>>> > 'Submit!','style'=>'clear:both' ) );
>>>> >
>>>> > view script:
>>>> > <? $this->dojo()->javascriptCaptureStart() ?>
>>>> > function validateForm() {
>>>> > var form = dijit.byId("signup");
>>>> > if (!form.validate()) {
>>>> > alert("Invalid form");
>>>> > return false;
>>>> > }
>>>> > return true;
>>>> > }
>>>> > <? $this->dojo()->javascriptCaptureEnd() ?>
>>>> > <? $this->dojo()->onLoadCaptureStart() ?>
>>>> > function () {
>>>> > dojo.connect(dijit.byId("signup"), "onSubmit", "validateForm");
>>>> > }
>>>> > <? $this->dojo()->onLoadCaptureEnd() ?>
>>>> > <div class="signupForm">
>>>> >
>>>> > <?= $this->form ?>
>>>> > </div>
>>>> >
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Checkbox-and-Dojo_foRM-validation%2C-please-help-if-anyone-know-how-tp19512338p19534303.html
>>>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>>>
>>>
>>> --
>>> Matthew Weier O'Phinney
>>> Software Architect | [EMAIL PROTECTED]
>>> Zend Framework | http://framework.zend.com/
>>>
>>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Checkbox-and-Dojo_foRM-validation%2C-please-help-if-anyone-know-how-tp19512338p19875163.html
Sent from the Zend Framework mailing list archive at Nabble.com.