Check DB if value fill form field

This is the place for queries that don't fit in any of the other categories.

Check DB if value fill form field

Postby bumbia » Tue May 20, 2014 7:31 pm

Hello folks,
first of all, let me say that even though this question might be basic and "searchable" I have no idea what to search for and therefore I'm stuck. I apologize if this is to basic/has already been answered.
Here's my situation. I've had a friend of a friend code up a skeleton for an app in Django so I have a base to stand on. I want to create a form with several fields but 3 of those should interact the following way:
When I enter a string of 1234567891234(12 numbers) in formfield 1 I want the app to search through column A in database. If it finds an identical match to the first 8 numbers I want it to fill formfield 2 with contents from DB column B and fill formfield 3 with the contents of DB column C. If it doesn't find anything I want it to do nothing with formfield 2 and 3.

I was wondering if you might provide me with some kind of terms/functions of which I could find more information about this. I can't code python just yet so I really don't know what to look for.
Any assistance would be greatly appreciated.
best regards Andreas
Last edited by Yoriz on Tue May 20, 2014 7:58 pm, edited 1 time in total.
Reason: First post lock.
Posts: 2
Joined: Tue May 20, 2014 7:19 pm

Re: Check DB if value fill form field

Postby Yoriz » Tue May 20, 2014 8:03 pm

Hi welcome to the forum.
You could start by doing the python tutorial version 2.7 / version 3.4
Once you understand python a bit you could move onto the django tutorial
Due to the reasons discussed here we will be moving to on October 1 2016
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 1672
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: Check DB if value fill form field

Postby bumbia » Fri May 23, 2014 5:01 am


can anyone give me some specific pointers at what functions I wanna look at?
Posts: 2
Joined: Tue May 20, 2014 7:19 pm

Return to General Coding Help

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 12 guests