Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,869
Community Members
 
Community Events
184
Community Groups

Dynamic form as custom dialog

I want to create a custom dialog that display form.
how can I do that?

1 answer

0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 27, 2021

Hi

This is a big question.
It's not very different than asking: I want to create a mobile app that will make lots of money. How can I do that?

This requires a fair amount of prior programming experience.

You can read this to get you started: https://scriptrunner.adaptavist.com/latest/jira/fragments/WebItem.html#_dialogs_advanced

@Peter-Dave Sheehan thank you for reply
but what I mean is: can I had annotation as parameter (from dynamic form
like:
@UserPicker(label = "User", description = "Select a user")
ApplicationUser user)
and put it in my dialog(in my html string)?
and what is the type of annotation in groovy?

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 27, 2021

You can’t use the annotations there. 

You have to build your own html form using plain html.
But for the form to do anything, you will have to include javascript to tell it what to do. You may need to created some rest endpoint for your javascript to point to. 

@Peter-Dave Sheehan  I want my form (that opened from the dialog) to be like jira style(css) like "create issue" style.
or in other words to make form like "create issue" but with my own code and fields .

some help?

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 28, 2021

You can use the AUI design patterns already included in JIRA https://aui.atlassian.com/aui/9.2.0/docs/forms.html

For example, in your dialog html, include a form like this

<form class="aui top-label">
<fieldset class="group">
<label for="textfieldid">Label for your field</label>
<input type="text" class="aui text" id="textfieldid" $/>
</fieldset>
</form>

With any additional fields you need. Note these fields will not be associated with any db information. You must populate with initial value yourself if that's the case. And as specified, the action to take when you submit the form (using an input type button ) will all have to be coded.

Cool!! TNX! that what I looked for
But what should I do to have the design?, cause it looks styleless

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 31, 2021

You may have to include some styles of your own.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events