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.
bumbia
 
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
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Spam topic disapproval technician
Windows7, Python 2.7.4., WxPython 2.9.5.0., some Python 3.3
User avatar
Yoriz
 
Posts: 721
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

Thanks,

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


Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 4 guests

cron