I'm looking for an api that would list all business types, any suggestions would be appreciated
Business types list?
I'm suspect we may need a bit more info, as I'm guessing this is not enough?
<?php
header('Content-Type: Application/JSON');
echo <<<EOD
[
"Type 1",
"Type 2",
"Type 3"
]
EOD;
- Edited
This is going to take a long time I guess
Oh I didn't see the top part, for example...
var options = {
url: "resources/countries.json",
getValue: "name",
list: {
match: {
enabled: true
}
},
theme: "square"
};
$("#countries").easyAutocomplete(options);
<input id="countries"/>
[
{"name": "Afghanistan", "code": "AF"},
{"name": "Aland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"},
...
]
It looks like you already have an API: just adapt whatever country list API to serve business types instead.
If you don't already have an exhaustive list of business types, that's probably going to be a bigger challenge. It might depend on why you want to record business types in the first place. Perhaps an open-ended field might turn out to be the right approach for your need.
laserlight There was a fun work around, it seems to work. The form isn't finished yet mind
What was the workaround? It seems to have a number of repeated entries, e.g., "Art dealers and galleries", "Gambling", and harder to detect duplicates like "Online games" and "Online gaming".
<div class="form-control">
<input list=business-catorgies required placeholder="Business type" class="bus-class">
<datalist id="business-catorgies" src="blist.text"></datalist>
</div>
Text file load, I still need to fix it a bit
So I thought I'd look to see if the UK has any sort of standardised list it uses for statistical purposes.
Standard industrial classification of economic activities (SIC)
It'll take sometime I guess, really though were is the resolved button?...
It no longer exists. It was an add-on for vBulletin, and so far as we can tell Flarum doesn't have any such ability.
dalecosp Good I thought I'd gone blind or something