I am trying to modify a existing web script's Upload Form where, currently you choose a Category...etc. and Submit. When a Category is chosen, I'd like another dropdown list of choices to display. Here is the code currently:

<div class="form-group">
<label class="col-md-12" for="category_id">{{LANG category}}</label>
<div class="col-md-12">
<select name="category_id" id="category_id" class="form-control">
<?php foreach($pt->categories as $key => $category) {?>
<option value="<?php echo $key?>"><?php echo $category?></option>
<?php } ?>
</select>
</div>
</div>

Any guidance/assistance with this appreciated.

If I understand you correctly, you want the second dropdown list to appear in the web browser as soon as the primary category is selected, before the user hits the submit button, is that correct? If so, you will need to do this on the web browser side with Javascript. An example of it being done successfully can be found here on Stack Overflow

If this isn't what you're trying to do, let me know.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.