Announcements
No record found.
Hi,
I'm building a form for a client and they have a requirement to populate certain checkboxes when another checkbox field is checked. I'm familiar with how to extend marketing forms with javascript but I just need some guidance on the actual function I would use to have it populate a checkbox field.
Hi pdr469,
For example, do you mean that you want to check the 'Do not email' when the 'Remember me' is checked in the following screenshot?
You want to trigger the script when the first checkbox is checked or the form is submitted?
Here is the doc about JS in marketing form, you could have a look:
Extend marketing forms using code (Dynamics 365 Marketing Developer Guide) | Microsoft Docs
Hi Steve,
It's a little more complex than that but yeah it needs to be when a checkbox is checked then go and check other checkboxes on the form. I'm already aware of that developer guide and I've been able to get some code to work but I'm stuck on what the actual statement is to check a checkbox field. I've done some Googling but haven't had much luck. I also have a requirement to hide some text and I can't figure out how to do that if it's not a field. It's just plain text a paragraph on the form.
You can use the form HTML editor to include some ID to the element wrapping the text you want to hide:
Like I did in the example above. I added id called MyTextToHide. Form editor will not remove this ID from the HTML, so you can use the Javascript to modify this field on the fly.
Thank you.
Petr
Thanks Petr. I ended up going with something similar for the solution!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
ManoVerse 151 Super User 2026 Season 1
Jimmy Passeti 51 Most Valuable Professional
NeerajPawar 42