I'm looking for an api that would list all business types, any suggestions would be appreciated

    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;
    

      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.

        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

            It'll take sometime I guess, really though were is the resolved button?...

            cluelessPHP

            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.

            Write a Reply...