0

I am new to AngularJS.

In the following fiddle, when user clicks on "This submit triggers validation. But I wanted to put this button at the end of the page" button. I could see alert/error but I want to show a custom message, which I am struggling to do it.

Header inputs:
    <input type="name" ng-model="sample" required/>
    <input type="name" ng-model="sampleX" required/>

    <input type="submit" value="This submit triggers validation. But I wanted to put this button at the end of the page"/>
</form>

<hr/>

Some other form here. Think line items

<hr />
<a class="btn" ng-click="triggerSubmit()">Wanted this submit to trigger the validation to the form on which this button doesn't belong, e.g. trigger to header</a>

js fiddle link http://jsfiddle.net/unWF3/6/

Thanks,
Kalyan Basa

1
  • just added the fiddle. Commented Mar 20, 2013 at 10:01

1 Answer 1

2

To disable native browser validation add novalidate attribute to form element:

    <form novalidate submit-on="myEvent" ng-submit="onSubmitted()">
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.