Questions tagged [ng-submit]

AngularJS directive in module ng

Enables binding angular expressions to onsubmit events.

Additionally it prevents the default action (which for form means sending the request to the server and reloading the current page), but only if the form does not contain action, data-action, or x-action attributes.

Link: http://docs.angularjs.org/api/ng/directive/ngSubmit

94 questions
0
votes
1 answer

Firing ngSubmit from button in ionic alert

I've built an ionic app and I use template driven form in Angular to collect form data and use ngSubmit to pass data to ts.file. I want to fire ngSubmit function through 'No and save data' button in alert but my alert function has nothing to do with…
0
votes
0 answers

my 'ngSubmit' sometimes error

so I have this html code.. i tried using (click) function, and its still like this

Add New Book

Calvin Adiwinata
  • 137
  • 2
  • 11
0
votes
1 answer

Angular Material matDatepicker doesn't work with ngForm ngSubmit when input is disabled

I have a problem with Angular Material matDatepicker. I have found that if I want to use the disabled attribute on it, I can't get the result value when using ngSubmit. Means this code works :
C. Banzet
  • 409
  • 2
  • 5
  • 19
0
votes
0 answers

Make submit from angular controller

I have var x = angular.element(document.getElementById('campito'[0] .attributes[2].submit; that show ng-submit="submit(campito)" How can I trigger the submit from the controller I have a form:
0
votes
1 answer

Angular Form submit button only fires on second click

I'm building a small webpage that does some queries to an API. The query happens when the submit button is hit, if all entered data is valid. However at some point when I was adjusting the form from a set of separate elements (textbox, selectbox,…
Ryan
  • 262
  • 3
  • 19
0
votes
1 answer

Angular 4 ngSubmit not getting values from jquery populated inputs

I populate form input field values programmatically with jquery. The values are visible in the form. When I console.log the form data on submit, that data doesn't contain the values. When i modify the values manually, the data does contain the…
edoras
  • 159
  • 3
  • 13
0
votes
1 answer

How to show errors on submit in AngularJS and stop form from submitting without disabling the submit button?

i want to validate my form with having errors for submitting empty fields what should i do in my controller? …
Anis
  • 1,190
  • 2
  • 13
  • 26
0
votes
1 answer
0
votes
2 answers

ng-submit doesn't fire anything in form

I have a basic problem and I can't understand why it isn't working
0
votes
1 answer

Form validation clears all fields if false

I have a simple form validation function for my form which consists of two text fields and two dropdown fields. It will alert me if I do not fill out a field, but it deletes the information from all other fields, and still submits the form. How can…
user2990
  • 15
  • 1
  • 8
0
votes
1 answer

How to update scope on form Submit, when ng-model value changes?

I am creating an edit customer form and passing an object of 30 key value pairs. I am then using ng-repeat to populate input fields of a form. All form is displayed nicely and with passed key, values. I can also change the value of any input…
0
votes
1 answer

Select element value not being sent with other form elements in Angular

I am using Angular to submit the contents of a form to an API endpoint. Everything worked fine until I tried to change one of the text input fields to a select dropdown. I am using ng-options to populate the select drop down but when I go to send…
webworm
  • 10,587
  • 33
  • 120
  • 217
0
votes
1 answer

Angularjs - How to disable submit button if any value exceeds the ng-repeat element value

I have such type of program. var app = angular.module("myApp", []); app.controller("myCtrl", function($scope) { $scope.records = [ { "Amt" : "500", }, { "Amt" : "800", }, { "Amt" :…
Mohammed
  • 648
  • 2
  • 12
  • 32
0
votes
1 answer

how can I use ui-keypress along ng-sumit?

I have a form like this
Ebin Manuval
  • 1,235
  • 14
  • 33
0
votes
1 answer

ng submit not getting triggered

I am relatively new to angularjs. when i try to submit the form, ng submit not getting triggered. Also i am unable to access $scope.user hence i am unable to post to server. I am not sure what's wrong!
Sunil
  • 13
  • 2