PDA

View Full Version : multi-select in template file



boogyman
05-15-2007, 05:54 PM
I am building a template file, for the creation of a new file to be placed into the database, however this is going to always be under 1 category, even though there are many categories in the database. This is all database driven, so I was wondering if there is any way of figuring out how to "auto-select" the category when its given from the database?



<label for="p_cat_id">Category:</label>
<select name="p_cat_id[]" id="f_cat_id" multiple="multiple" class="required" size="10" style="width: 250px;">
{options:categories,F_CAT_ID}
</select>


that loads in all of the categories and properly indexes them accordingly to their "parent category"

Bob90
05-15-2007, 08:19 PM
We need more detail

What does a possible output look like?

If you could output valid JS that would be easy to sort, So until then its a database problem.

:)

Maybe PM a Mod and get them to move it to another forum?

:)