https://wiki.vertuna.com/display/TEST/Demo+with+conditional+rules+to+show+or+hide+fields+on+the+form

Ravikumar April 8, 2019

How to get the source configuration for below demo ?

https://wiki.vertuna.com/display/TEST/Demo+with+conditional+rules+to+show+or+hide+fields+on+the+form

I want to hide set of confiform fileds based on list box selection for example if "Normal" is choosen the below field has to be hide automatically.  if [entry.changeType] == 'Normal' , i want to disable below fields like "Change justification" , "Late submission Reason" etc.

Please provide sample code snippet, how to do this ?

image.png

1 answer

0 votes
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 9, 2019

There is a complete storage format for this demo, included on the same page.

Direct link is: https://wiki.vertuna.com/display/TEST/Demo+with+conditional+rules+to+show+or+hide+fields+on+the+form+-+storage+format

Ravikumar April 9, 2019

image.png

If Risktype=='Normal' i need to disable all the fields below Justification.

How to do that ?

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 9, 2019

Have a look at the demo provided - it shows you how to hide the fields based on the selection in another field.

 

I dont see the "values" for the "riskType" field - only labels, but assuming you have IDs set the same as labels for the "riskType" dropdown field...

You will need to add "ConfiForms Rules for Field Definition" macro and set the parameters to something like this

Screenshot 2019-04-09 at 20.46.25.png

 

Screenshot 2019-04-09 at 20.47.36.pngScreenshot 2019-04-09 at 20.47.45.png

Ravikumar April 9, 2019

thanks a lot Alex. 

This works like Charm !! :)

i am able to dynamically control the fields based on drop down now. 

But i have one more problem. 

the email generated when i submit the form should not show those fields which i am hiding, since the email is static dump of html i cant control it. image.png

As of now email appears like this  i dont need the second tabular column to be generated in email if change type is "Normal" 

 

image.png

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 9, 2019

We shall stop using Atlassian Community as the support channel - this is not what it is designed for. Especially when you switch the topic during the conversation

 

To answer your question about the fields showing up - there are 2 methods to resolve that - using Velocity #if() #end constructions or using the ConfiForms ifMatches macro and adding the conditional block into the macro body

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events