I’ve got two submit buttons in my form:
- Button to submit/save the form and insert the input fields to the database.
- Button to load the records into the form that are already in the database, based on a drop-down selection. For example to change the existing records in the database.
Now i know how to submit a form without clicking the submit button:
onChange = "this.form.submit()"
But what i want is to remove the ‘Load button’ to that if i make a selection in the drop-down it automatically loads the records, instead of submitting the total form with the code above.
Any idea how to achieve this?
If you are using jquery you can load the data on a drop-down change like so:
Please see the documentation