I am facing a challenge with a web page I have created that uses PHP to generate forms for updating information via a REST API on a remote server.
The structure of the forms is as follows:
Textfield: name
textfield: description
select: type (ng-model="selection")
option a
option b
option c
textfields f1, f2, f3: some may be hidden based on selection.
button triggers AngularJS function update() when clicked.
There are several of these forms scattered throughout the page. How can I retrieve the data entered into these fields to pass it to the update() function using AngularJS? My initial thought was to use JavaScript getElementById method, but I believe there must be a more elegant solution available.