• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Default category when creating new items

jOOc

Member
Showcase
When I create a new item in Showcase its always the last category that is default in the create item list. Can this be changed?
 
hmm, there is nothing set to "default" as "checked", so if that is happening, it could be a browser issue. Which browser (and version of that browser) is this happening on?
 
Here is how the source code look like in the browser

upload_2014-12-8_17-54-6.png

In IE11 "Category 2" is chosen as default
In Chrome39 "Category 3" is chosen as default
 
That looked better, the first empty option was default and no "selected" in the code for the option list.
Maybe some add-on that is doing this. I have many so will take me some time to check.
 
btw, there is ONE rule exception to this with the new "Create Item" button that is located in FORUMS (next to the create thread button) that are associated to Showcase Categories. It will "pre select" the showcase category that is associated with that Forum... if there are multiples, it will select the last (because its within a loop). There is no way to "pick" which one is pre selected. You'd be better off just removing that check from the template.

template name: nflj_showcase_choose_category
HTML:
            <select name="category_id" class="textCtrl" id="ctrl_category_id" autofocus="true">
                <option value="0">&nbsp;</option>
                <xen:foreach loop="$categories" key="$categoryId" value="$_category">
                    <option value="{$categoryId}"
                        {xen:if '!{$_category.allow_items} or !{$_category.canCreateItem}', 'disabled="disabled"'}
                        {xen:if '{$_category.thread_node_id} == {$nodeId}', 'selected="selected"'}  
                        >{xen:string repeat, '&nbsp; ', $_category.depth}{$_category.category_name}</option>
                </xen:foreach>
            </select>

remove this:
HTML:
{xen:if '{$_category.thread_node_id} == {$nodeId}', 'selected="selected"'}
 
Back
Top