How to dynamically load fields in a form on Horizon?

asked 2014-04-07 04:16:42 -0600


Can someone throw some light on how to dynamically load input fields of a form?

For example, I intend to mimic how "Instance Boot Source" works on http://<ip>/dashboard/project/instances/ "Launch Instance". I have something similar for my form too, but I can't figure out how it is done. My form class is inheriting from SelfHandlingForm.

Thanks, Prasoon

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-04-08 08:10:44 -0600

jpichon gravatar image

I think you're interested in the switchable fields, see the documentation here: . The security group rule editing is an example that uses it with the form class:

I hope this helps.

edit flag offensive delete link more


Thanks alot, this was what I wanted.

Had another question, do we have any module which auto-refreshes only table.render in any index.html ? I have written a javascript for reloading the entire page, was wondering if there is any better way of doing that.

prasoontelang gravatar imageprasoontelang ( 2014-04-08 23:26:39 -0600 )edit

I'm not sure we do, usually we only have AJAX on specific rows when their status is changing.

jpichon gravatar imagejpichon ( 2014-04-09 08:25:52 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-04-07 04:16:42 -0600

Seen: 368 times

Last updated: Apr 08 '14