Dynamically show and hide form elements?

10 views
Skip to first unread message

Lewis, Eric

unread,
Feb 5, 2016, 10:14:28 AM2/5/16
to biouno...@googlegroups.com
Hi

I'm trying to create a pretty complex form: The job should generate other jobs using the Job DSL plugin (which is awesome, by the way).
Since we have different types of jobs/projects, ideally the form would show and hide certain form elements depending on the value from the parameter PROJECT_TYPE (a drop-down list).

I have tried doing this with the plugin, but the best I can do is just to show something like "(not applicable)".
Have I missed this feature or doesn't it exist at all? If it doesn't exist, should I write a feature request?

Best regards,
Eric

Ioannis Moutsatsos

unread,
Feb 5, 2016, 11:41:37 AM2/5/16
to BioUno Users
Hi Eric;

This is a valid requirement. 

Unfortunately, at present it's not possible to hide the parameter completely (i.e. it's name and description always remain visible). However, you can hide the input control by dynamic HTML rendering an AC Reactive reference in the following form: 

html='''
<input name="value" type="hidden">
'''

return html

It would be good to file a feature request.

Regards
Ioannis

Bruno P. Kinoshita

unread,
Feb 5, 2016, 3:00:59 PM2/5/16
to biouno...@googlegroups.com
That sounds like a great new feature! I'm using the Job DSL plug-in for PHP and Java systems, and would be interested to see your use case working with the plug-in.

If you can file an issue for that in issues.jenkins-ci.org with component=active-choices-plugin, we can start working on that in the next development cycle maybe :)

Cheers
Bruno



From: Ioannis Moutsatsos <imout...@gmail.com>
To: BioUno Users <biouno...@googlegroups.com>
Sent: Saturday, 6 February 2016 5:41 AM
Subject: Re: Dynamically show and hide form elements?

--
You received this message because you are subscribed to the Google Groups "BioUno Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biouno-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Lewis, Eric

unread,
Feb 8, 2016, 3:22:09 AM2/8/16
to biouno...@googlegroups.com

Hi Ioannis

 

Thanks for your help! I implemented it like you suggested, and it works well, but of course is a bit confusing for the users.

So I created https://issues.jenkins-ci.org/browse/JENKINS-32827

 

Best regards,

Eric

--

Lewis, Eric

unread,
Feb 8, 2016, 3:22:54 AM2/8/16
to biouno...@googlegroups.com

Hi Bruno

 

Thanks for your support! I filed the following issue: https://issues.jenkins-ci.org/browse/JENKINS-32827

 

Best regards,

Eric

Reply all
Reply to author
Forward
0 new messages