Forming a form

Today we tried creating a form in Django. It is pretty straightforward.

Also added JavaScript to the template of the form itself. Everything that we create in with forms module is converted into HTML so we can directly access the IDs of those fields.

Right now our fields are disabled and enabled correctly but we have not yet found a perfect solution to directly access database from the JS. We might not even have to.

There are two options we found to achieve this dependent selection:

  1. jQuery
  2. AJAX

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s