http://old.nabble.com/retrieve-textfield-value-prior-to-validate-submit-ts29140392.html#a29143397
http://old.nabble.com/Conditional-Validators-ts25965733.html#a25968657
http://old.nabble.com/simulate-form-submission-events-without-Submit-component-ts26395631.html#a26420669
http://old.nabble.com/T5%3A-query-about-onValidateForm%28%29-ts25988466.html#a25991918


bbcooper wrote:
> 
> Hi,
> 
> seems very basic, but I can't make it work. I want to do some custom form
> validation before submit happens. What is wrong with my form observers?
> Clicking on gameImage works just fine. None of the bellow versions of
> questionnarie event observers work.
> 
> var MyValidator = Class.create({
>     initialize: function() {
>         $('gameImage').observe('click', this.hello.bind(this));
> 
>         Event.observe('questionnarie', 'submit', function() {
>             Tapestry.debug("hello x");
>         });
> 
>         //$('questionnarie').observe(Tapestry.FORM_VALIDATE_EVENT,
> this.hello.bind(this));
>         //$('questionnarie').observe('submit', this.hello.bind(this));
>         //$('questionnarie').observe('submit',
> this.hello.bindAsEventListener(this));
>     },
> 
>     hello: function(event) {
>         Tapestry.debug("hello");
>     }
> });
> 
> 
> Template snippet:
> 
>             <p id="gameImage"> ${context:images/egypt3.jpg} </p>
> 
>             <t:form t:id="questionnarie" t:type="CustomForm"
> t:autofocus="false">
>                 <t:label for="answerRadioGroup"/>
>                 <t:RadioGroup t:id="answerRadioGroup"
> value="radioSelectedValue" t:validate="required" encoder="stringEncoder">
>                     <t:loop source="answers" value="answer">
>                         <p class="game_answer">
>                             <t:Radio t:id="rad" value="answer.answer"
> label="${answer.answer}"/><t:label for="rad"/>
>                         </p>
>                     </t:loop>
>                 </t:RadioGroup>
>                 <t:customerror for="answerRadioGroup"/>
>                 <div class="game_submit"><p><t:submit t:id="confirm"
> value="_"/></p></div>
>             </t:form>
> 
> 
> Thanks for any input.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Catching-an-event-prior-to-form-submition-tp29354955p29356380.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to