[[+content_image]]
F
F
fragsteelpad2017-10-26 10:13:08
JavaScript
fragsteelpad, 2017-10-26 10:13:08

whenClient checkbox not working in yii2?

There is a checkbox on the form , but this line does not work [['login','district'],'unique', 'whenClient'=>"function (attribute,value) { return !($(#TV).prop( 'checked'))}"]. Though similar line with dropdownList works fine

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
D
Dmitry Kim, 2017-10-29
@fragsteelpad

I think I missed quotes:

function (attribute,value) {
  return $('#TV').not(':checked');
}

F
fragsteelpad, 2017-10-26
@fragsteelpad

I still don't understand why it doesn't work. Wrote ajax validation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question