KES free asked 1 year ago


Expected behavior Hi. How can I programmatically determine checkbox is pressed (active).

Actual behavior

Resources (screenshots, code snippets etc.)


Dawid Wajszczuk staff answered 1 year ago


Hi,

I'm not sure if by "active" you meant checked. If so, you need to simply add this JS code

document.querySelector('#checkbox').checked = true

Here is the snippet: https://mdbootstrap.com/snippets/standard/d-wajszczuk/3321576.

Keep coding,
Dawid



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: computer
  • Browser: firefox
  • OS: linux
  • Provided sample code: No
  • Provided link: No