Recent searches
No recent searches
APIv4: How to hide the organization field on contact form
Zendesk Luminary
Posted Oct 31, 2024
Hi all! I just updated my help center theme from APIv2 to v4 in order to get greater form customization options. But I'm currently finding it more difficult. Hoping to find some advice.
In particular, I need the organization field on the contact form to be hidden. The customer's default organization is fine to pass through. But they don't need to see other organizations if they're part of more than one.
Ideally, it would be great if the field ID was added as a class for the div that contains each form field. But I'm struggling to make sense of the new js assets that are in the latest Copenhagen theme. Can anyone point me in the right direction for this?
0
3
3 comments
Jakub
You can achieve it with React with this prompt in the new_request_page.hbs
props.requestForm.organization_field = false;
1
Bryan
Amazing! Thank you sir.
0
Dustin Swayne
How can I pop an alert in a certain field equals a value on change? tried this:
document.addEventListener("DOMContentLoaded", function() {
// Check if the value in props.requestForm.ticket_fields[256] is "No"
if (props.requestForm.ticket_fields[256] && props.requestForm.ticket_fields[256].value === "no_rejects") {
// Trigger the alert
alert("The value is 'No'. Please take necessary action.");
}
});
but doesn't work….
0