0

I am working on my first CakePHP project.

I am building a form on a page and want the form to submit after selecting a option in a <SELECT> atribute

Normally (Not in Cake) I use the option onchange="this.form.submit();"

But for some reason my form in Cake refuses to submit the form.

Can someone help me in this?

AgeDeO
  • 3,137
  • 2
  • 25
  • 57

1 Answers1

1

check answer here Javascript select onchange='this.form.submit()'

Why dont you use jquery. its simple include jquery , give form and select input a id . then use following code

$('#selectElementId').change(
function(){

     $('#formElementId').submit();

});
Community
  • 1
  • 1
Saifuddin Sarker
  • 853
  • 3
  • 8
  • 26