Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!

KES free asked 3 years ago


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

Actual behavior

Resources (screenshots, code snippets etc.)


Dawid Wajszczuk staff answered 3 years 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

  • ForumUser: 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