SOTA autocomplete with dropdown #808
Replies: 8 comments 21 replies
-
Good question, I think we could just keep it a text file similar to the scp file that seems quite snappy and one less database call. Counties need pretty much the same either text, json that can be checked against the "state" then pull up the available counties. There is a DOK file @phl0 did point me at it but I have lost it! |
Beta Was this translation helpful? Give feedback.
-
You want to pull DOK data in from a list of valid entries? |
Beta Was this translation helpful? Give feedback.
-
File it is then. I just need to tweak the css, as it has it's own file, and it would be nice to get it to match the rest of the theme. I'm nearly there for the Superhero theme: @magicbug I guess Counties can be done the same way, but SOTA first. And I would need a list of Counties connected to states. @phl0 if you can get me a text-file with the DOK's, the same can be done there. |
Beta Was this translation helpful? Give feedback.
-
Have a look here: I did write some perl magic to pull current DOK data from the DARC website and parse it along with the clear text names etc. |
Beta Was this translation helpful? Give feedback.
-
#831 added. Please test it out. It's just for SOTA now, but when it is done and merged, I'll look into counties and DOK's. |
Beta Was this translation helpful? Give feedback.
-
Now that the PR is merged, I've added another PR for this to be active in the edit dialog. @phl0 I'll see if I can make a cron job for autoupdating DOK from your file. Thanks. Perhaps you could do the same for the SOTA as well? The full file is here: https://www.sotadata.org.uk/summitslist.csv All I need, is the first column in a text file. |
Beta Was this translation helpful? Give feedback.
-
@AndreasK79 this may just be my personal logging style but do you think there's a possibility here to, once the summit identifier is selected, pull the summit name, gridsquare, etc from the SOTA API and automatically insert them into the relevant fields as well? |
Beta Was this translation helpful? Give feedback.
-
Sorry, a bit late to the party but is there a plan to implement this for the creation of station locations, too? As a SOTA activator it would be awesome to have this as you create a new station for every activation and since station locations don't save without a grid locator you have to look up the locator every time (or use the QSO form as a workaround ;) ) Thanks and 73 de Beni HB9HNT |
Beta Was this translation helpful? Give feedback.
-
I started looking for something better than a dropdown when it comes to loading a lot of selections in a form.
I ended up with trying out selectize. You can specify a text-input, which then loads a result via ajax and presents it as a dropdown. like this:
In my test, I limited the result to 30 to get it snappy enough to use, as too many entries would slow down everything.
@magicbug The question now is which solution I should use. Should I use a plain txt-file to preg_grep from, or should I create a new sota-table in the database? I have both solutions working on my machine. The SOTA list contains 152k entries. I don't know how often these get updated, so I don't know how much job it is to maintain a list.
I think something similar could be used for US Counties, as loading several thousand in a dropdown select would slow things down.
Beta Was this translation helpful? Give feedback.
All reactions