Ask Your Question
0

How to dynamically load fields in a form on Horizon?

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

Hi,

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
1

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

jpichon gravatar image

I think you're interested in the switchable fields, see the documentation here: http://docs.openstack.org/developer/h... . The security group rule editing is an example that uses it with the form class: https://github.com/openstack/horizon/...

I hope this helps.

edit flag offensive delete link more

Comments

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 -0500 )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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 320 times

Last updated: Apr 08 '14