Recent searches
No recent searches
Requiring CC Field
Answered
Posted Jan 26, 2024
CC field is optional by default on a new request form. Is there a way to force the CC into being a required field?
1
6
Recent searches
No recent searches
Posted Jan 26, 2024
CC field is optional by default on a new request form. Is there a way to force the CC into being a required field?
1
6 comments
Jakub
Hey Alek Reed
Add:
in your script.js:


the result:
0
Alek Reed
This worked really well for me! Super simple and easy. Thank you again Jakub
0
Alek Reed
Unfortunately, if it was working it has stopped working. After putting in the email address (clicking away, to make sure the CC takes it) I still get the required warning when trying to submit. Im not sure why its not recognizing that the field has content. Thoughts? Jakub
0
Jakub
Alek Reed
This was not easy puzzle to solve, but I am hopeful the following code will work as expected, I tested it with one CC and it worked.
It looks like initially it didn't work because there was no way to capture that a CC is actually added, there might be some JavaScript validation or event handling in Zendesk that is overriding this behavior and I had to work around that.
This script will:
MutationObserver
to watch for changes in the CC email list.required
attribute based on whether any CC emails are present.1
Alek Reed
Thank you Jakub - I can see how much time you put into that and I really, really appreciate it!
0
Luke Riggins
Jakub We are trying to use this same code to make our CC field required. Is this code still applicable in 2025? If so, where do we add it in the code? We have tried pasting it into the top and bottom of script.js, but there has been no change to the request form.
0