1,105,328 Community Members

How to create a formfield that checks validation based on set of flat files

Member Avatar
Angle90
Newbie Poster
17 posts since Aug 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

How can I explain this. I have a list of postcodes in text files in an external url and I have a formfield.

When people enter data into the form field, using javascript validation, I want the form to check if the entered data exists in any of the external postcode files.

Is there anyway this can be possible ? if so can you please explain.

Thanks in advance.

Member Avatar
Airshow
WiFi Lounge Lizard
2,798 posts since Apr 2009
Reputation Points: 333 [?]
Q&As Helped to Solve: 393 [?]
Skill Endorsements: 11 [?]
Team Colleague
 
0
 

This may be possible. What have you tried? Please demonstrate some effort!

Member Avatar
Angle90
Newbie Poster
17 posts since Aug 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I have over 2 million UK postcodes in multiple flat files and I have a static search field.

When people enter data into the search field, I want the field to guess or autocomplete the field based on the data input.

So when a visitor is entering their postcode in the field, I don't know how to make it happen that the fields prediction or autocomplete is fetched from the multiple postcode flat files.

I have thought of using a simple dropdown list, but that would be a very long list as you can imagin.

I really need help with this.

Member Avatar
jstfsklh211
Junior Poster
155 posts since Apr 2011
Reputation Points: 38 [?]
Q&As Helped to Solve: 35 [?]
Skill Endorsements: 2 [?]
 
0
 

you wouldn't be able to do this with plain js you'd need to use ajax and return a json list of possible values from your external file(s)

thousands in flat files sounds like a terrible idea, you might want to consider a database

Member Avatar
jeffcogswell
Light Poster
65 posts since Jul 2010
Reputation Points: 175 [?]
Q&As Helped to Solve: 5 [?]
Skill Endorsements: 10 [?]
Staff Writer
 
0
 

Are you using jQuery? If so, they have an example that uses the jQueryUI autocomplete and does basically what you're describing: http://jqueryui.com/autocomplete/#multiple-remote

You
Post:
Start New Discussion
View similar articles that have also been tagged: