← Back to team overview

openstack team mailing list archive

Re: Adding Custom form field in Openstack Dashboard.

 

That generic error is what happens when there's a 500 error on the server-side while submitting a form via AJAX. Take a look in the Horizon console log to see what really went wrong.


-          Gabriel

From: openstack-bounces+gabriel.hurley=nebula.com@xxxxxxxxxxxxxxxxxxx [mailto:openstack-bounces+gabriel.hurley=nebula.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of Srikanth Kumar Lingala
Sent: Tuesday, October 09, 2012 12:22 AM
To: openstack@xxxxxxxxxxxxxxxxxxx; openstack-dev@xxxxxxxxxxxxxxxxxxx
Subject: [Openstack] Adding Custom form field in Openstack Dashboard.

Hi all,
I have added my own custom text box field in the form 'Launch Instance' page. For that, I modified the following file:

/usr/lib/python2.7/dist-packages/horizon/dashboards/nova/instances/workflows.py

Added text box in the above script as follows:

sample = forms.CharField(max_length=15, label=_("Sample"), required=False)

Now, I want to access the posted value of the above field. For that, I am using context['sample'] variable. When I clicked on the 'Launch' button, I am getting a Horizon alert error as the following:
There was an error submitting the form. Please try again.

Please suggest me to fix the issue.
Thanks in advance.

--
----
Srikanth.


References