Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hide the "Create" button on a specific form

Aisha M
Contributor
February 20, 2026

Hi,

I have a service desk portal with multiple forms. I have a specific form which I want to be visible to users, but the user should NOT be able to click "create"

I have tried adding a script on the Create transition of the service desk workflow, but nothing happed.

import com.atlassian.jira.component.ComponentAccessor

import com.atlassian.servicedesk.api.requesttype.RequestTypeService

import com.onresolve.scriptrunner.runner.customisers.PluginModule

import com.onresolve.scriptrunner.runner.customisers.WithPlugin

@WithPlugin("com.atlassian.servicedesk")

@PluginModule

RequestTypeService requestTypeService

def currentUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser

def query = requestTypeService.newQueryBuilder().issue(issue.id).build()

def requestType = requestTypeService

        .getRequestTypes(currentUser, query)

        .results

        .first()

def requestTypeName = requestType?.name

return requestTypeName != "Test request form"

Is there any way this could be done ? I don't want to restrict the form, because that will completely  hide it from the portal.

2 answers

0 votes
Marc -Devoteam-
Community Champion
February 20, 2026

HI @Aisha M 

Scripts don't apply on a JSM portal.

On Cloud there are no options to change UI items on the product.

Best solution is to set a validator on the create condition of the workflow used by the work type of the request based on a field required, just don't place this field on the request, so then it can't be created.

Or do place it on the request, but set a validator to be provided an option, that does not exist.

Aisha M
Contributor
February 20, 2026

@Marc -Devoteam-  For now, the changes I want to implement is on the DC environment. 

I cannot find a suitable validator, perhaps a JQL one to imply, customer request type != the form , in order for the create transition to happen

Marc -Devoteam-
Community Champion
February 20, 2026

HI @Aisha M 

Just use a field required validator, just use field from your system, that is not used in the create screen.

Aisha M
Contributor
February 20, 2026

@Marc -Devoteam-  But the "Customer request type" is not a filed, rather the type of form. So, not sure how a field required validator would help.

Also, we have multiple other forms on the service desk portal. I don't want any of the other forms to be affected. 

0 votes
Ugnius Aušra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 20, 2026

Hello @Aisha M 

I’d like to better understand the use case here.

For what purpose should the form be visible in the portal if users are not allowed to create requests from it?

Aisha M
Contributor
February 20, 2026

Hi @Ugnius Aušra , We are in the process of migrating to Cloud. So, the form deals with app integrations with Jira. Despite the form having a NOTE on stop suggesting things are temporarily on hold,  users still go ahead and submit the request. So want to disable to submit/create button.

We want the users to know the form exists, but just that requests cannot happen now 

Alan Bruce
Contributor
February 20, 2026

A couple of things might work.

  • create a required field that is hidden so the form can never be submitted.
  • Create an Automation rule that closes the ticket and emails the submitter with the reason why the request option is not available.
  • I am would just set the permissions on the request type so that only admins can see it and regular users cannot.
  • Move the request type to 'Hidden from portal' for the Portal Group.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events