ConfiForms dropdown and multi-select with Other option

Jane Smith March 8, 2024

I've read this Vertuna page about creating a User Macro to have a dropdown with the "Other" option that will trigger an open text field. Is there an easier way to do this method? I cannot find the option to create my own User Macro (I think it is on lockdown from my system administrators). I've also never written a macro as described in the Vertuna page. Is it also possible to do this with the multi-select option?

2 answers

1 vote
Alex Medved _ConfiForms_
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 Leaders.
March 8, 2024

Hi @Jane Smith 

This does not have to be a user macro - it is just a bit easier to reuse (in other forms) if you do it as a user macro.

We show that it is just 3 macros

  • ConfiForms Definition macro for the dropdown
  • ConfiForms Definition macro for the text field to capture "Other" text value
  • ConfiForms Rules for Field Definition to show/hide the text field based on the choice made in the dropdown

So, it can very easily be a 3 macros, no user macro is needed

Alex

0 votes
Rayman Bacchus March 9, 2024

I've used Alex's solution multiple times in one form as I have several multi-select fields all with an Other option.  If Other is selected I am supposed to open (show) a text field so the user can provide a detail of what "Other" is defined as

I actually have two rules

Rule MultiselectField:Other then Show Field TextOther
Rule !MultiselectField:Other then Hide Field TextOther

I use the ! option just in case my user decides to take away the Other option in my multi-select

 

Alex Medved _ConfiForms_
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 Leaders.
March 9, 2024

Could be done with one rule, as you can set it with "reverse flag" (parameter on the macro). So one rule will actually behave like 2 :-) Saving some configuration time and easier to maintain

Like Rayman Bacchus likes this
Joe66 April 5, 2024

Need help. I have the same use case of showing a text field if i select 'Others' option from the multi select dropdown. 

The multiselect dropdown goes missing and obviously I can't even choose any of the options for show/hide field to work.  Don't know where I'm going wrong. 

confiform field definition macro for multiselect field.

field name: Choices

field label : choices

field type: multi-select

options:

id - label

1 - choice1

2 - choice2

3 - others

confiform field definition macro for text field for 'Other' value.

field name : OtherChoice

field label : other choice

field type: text

confiform rules for field definition:

field name : OtherChoice

condition: !Choices:3

action: hide field

actionable field name: Choices

Reverse rule: true

 

Alex Medved _ConfiForms_
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 Leaders.
April 5, 2024

So, why do you have a reverse rule like that? This doe snot make much sense, logically...

You will need to have a separate rule to show the OtherChoice

One rules with Choices:3 to show and one rule with !Choices:3 to hide

Reverse rule means that ANYTHING but the Choices:3.. that is why it is not suitable for the multi-select fields

Joe66 April 5, 2024

I unchecked the reverse rule and defined two rules to show and hide. Got back the multiselect dropdown but the text field isn't displaying when I select 'Others' option.

rule to show: 

field name : OtherChoice

condition: Choices:3

action: show field

actionable field name: Choices

Reverse rule: false

 

rule to hide:

field name : OtherChoice

condition: !Choices:3

action: hide field

actionable field name: Choices

Reverse rule: false

Alex Medved _ConfiForms_
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 Leaders.
April 5, 2024

Certainly works for me

Here is what I have configured for rules macros

Screenshot 2024-04-05 at 19.08.56.pngScreenshot 2024-04-05 at 19.08.48.png

Alex

Like Joe66 likes this
Joe66 April 5, 2024

This worked Alex. I had switched 'field name' and 'actionable field name' .

Thank you !!

Joe66 May 7, 2024

Hi @Alex Medved _ConfiForms_ 

I was testing something and i found out that if i select 'Others' option and enter value 'ABCD' in the textfield and save the confiform, and  later on, edit the confiform to deselect the 'Others' option, the text field is getting hidden but the value 'ABCD' is still present in table view macro as it's mapped to the confiform. Basically, it's only hiding the textfield but i also want it to be empty on deselecting the 'Others' option.

Anyway to make it empty ?

 

Alex Medved _ConfiForms_
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 Leaders.
May 7, 2024

You will need to either use the option in Hide Field rule to reset the value as well

Screenshot 2024-05-08 at 08.34.11.png

or implement an additional Reset Value rule

Alex

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events