VMware Cloud Community
twoton
Enthusiast
Enthusiast

Show/Hide Input Boxes Based on Checkbox

Hello-

I am trying to create a catalog item that will allow a user to clone a machine from a template.  I want to be able to give them the option to choose DHCP or static IP address assignment based on a checkbox, and if they do choose static assignment, display a list of input boxes that allow them to enter the IP information.  Is this possible?  I've found a lot of examples of how to dynamically populate a drop down list from different sources, but nothing that really covers dynamically showing/hiding form inputs.  Thanks!

0 Kudos
2 Replies
SeanKohler
Expert
Expert

I know for certain it is possible if you front IaaS Blueprint requests with XaaS forms. 

I have not found it to be possible to selectively apply the "visibility" aspect of custom properties.  But maybe we are both missing something.

There remains a lot more dynamism in the XaaS forms even though there is considerable improvement with external action calls in the IaaS forms.  If you cannot relax a requirement of showing the property field, you probably have to go down the route of XaaS presentation.  (it is more work without a doubt) 


If you can relax the requirement, it IS possible to have a dropdown field that is either empty or populated based on items in the form.  (including boolean selections)  You could have a form that


1. Asks for DHCP/STATIC

2. If STATIC, Populates available VLANS

3. When VLAN selected, populates the first three octets.

4. They type in the last octet.


Or things to that effect. 

But you wouldn't be able to remove the fields in this scenario.  Maybe someone will come through who can provide us a way, though.  Selectively hiding fields would be useful.

twoton
Enthusiast
Enthusiast

Thanks. I'm fairly new to the vRA environment as a whole and I've looked at some of the XaaS stuff, but not sure I want to bite that bullet and go down that road yet.  I think for now, I will probably just create a separate catalog item for deploying a machine with a static IP vs DHCP, but it would definitely be useful to have a show/hide property for custom properties based on other properties.  Maybe in a future update...

0 Kudos