atria
November 17, 2021, 11:01am
1
Hi
We recently completed a test upgrade of cht-core from 3.2 to 3.7, using the admin upgrade feature. While testing we found that contact forms are visible to CHV’s.
as shown below in the screenshot, a CHV can access the edit-district contact form
how can i hide disable this contact form from the CHV users ?
1 Like
diana
November 17, 2021, 11:22am
2
hi @atria
Contact forms are excluded from being displayed in drop-ups based on their id:
return true;
});
};
const filter = function(form, options, user) {
if (!options.includeCollect && form.context && form.context.collect) {
return false;
}
if (options.contactForms !== undefined) {
const isContactForm = form._id.indexOf('form:contact:') === 0;
if (options.contactForms !== isContactForm) {
return false;
}
}
// Context filters
if (options.ignoreContext) {
return true;
}
if (!form.context) {
Make sure all your contact forms ids should start with form:contact
and you should stop seeing contact forms in actions drop-ups.
1 Like
atria
November 26, 2021, 11:16am
3
@diana thanks this was quite helpful. Much appreciated.
Turns out that i had the wrong application settings which set different roles to users and thus causing the issue around CHV getting contact forms.
1 Like