I use Angular JS to manage all forms. Data for inputs is stored in the corresponding one ngModel, which can be processed in $scope controller.
So, I have the following form settings:
<form name="addJob" novalidate data-ng-submit="addJob.$valid && addJob(job)">
<input type="text" placeholder="Job Title" data-ng-model="job.title" required />
<textarea placeholder="Brief" data-ng-model="job.brief"></textarea>
<button type="submit" data-ng-disabled="addJob.$invalid">Add Job</button>
</form>
This works absolutely fine in all major browsers (except that I have not tested IE). You will notice that I did not include the name attributes on the input or text field. Do I need them for any reason? I read the following:
Note: Only form elements with a name attribute will have their values passed when submitting a form.
But my data is transmitted absolutely accurately, because it is connected with ngModel. Was the correct method to include or not to include name attributes?