Pop Up on field entry/selection of form

Scott Boisvert August 15, 2019

I've searched around a bit. I have ScriptRunner, was wondering if it was possible to create a pop-up with fields for additional entry based on the selection of another filed (i.e. checkbox or select list). 

For example I have a checkbox field and when option 1 is selected I want a popup screen displayed with 3 additional fields that need to be populated.

Only thing I could come up with would be to create a tab for each selection of the checkbox with the appropriate fields, hide the tabs by default and then when the selection is made, unhide the tab, and switch to the tab. After that I can't think of way to get back to the original tab, other than another behaviour on the last field maybe.

Was thinking a pop-up with a done button would work better.

1 answer

1 accepted

0 votes
Answer accepted
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.
August 15, 2019

While scriptrunner script fragment would let you create web items that can display a dialog box (with the full source of the dialog having to be designed and fed using REST API), there is no good way to integrate that with a field change. You would have to write your own javascript to react to field change, and display the popup. But then you would have to somehow set the value of the hidden fields so that they are included in the form submit.

 

Tabs or otherwise hidden fields that are displayed using behaviour script is the way to go here.. I would consider showing the additional fields/tab when you make a selection, but then leave them visible. There is no point in hiding them again after. 

Scott Boisvert August 15, 2019

Thanks Peter, I figured as much, but thought I would ask.

I wouldn't hide them again, but would want the user taken back to the original tab after completing the information on the field specific tab.

Looking at using this for a new hire form, where there would be a checkbox field with 25+ check boxes, some of the selections would require additional information, which would be on the additional tabs and only displayed if the appropriate checkbox is selected. 

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.
August 15, 2019

Then what you can do is have either a single or a few additional tabs and make sure there is at least one required field on that additional tab.

So as you check each of the applicable checkboxes out of the 25, the list of fields on the additional tab(s) is adjusted.

Then by having one or more required fields on those tabs, you can make sure that the user visits those tabs and make adequate selections.

You just separate in the user flow the selection of options and the filling out of details.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events