• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

RM 1.2 Upload file option check box (resource add)

I would like to have Default check radio for "Does not have file" instead of Uploaded file (as shown below).
I have tried to change as below which didn't work. Appreciate any suggestions.
Resource_add template change
<li><label><input type="radio" name="resource_file_type" value="fileless" {xen:checked '{$resourceType} == "fileless"'} /> {xen:phrase does_not_have_file}</label>
<li><label><input type="radio" name="resource_file_type" value="fileless" checked="checked" /> {xen:phrase does_not_have_file}</label>


XenForo developer
Staff member
This template is used for editing as well, so you need to be very careful how you handle this.

The issue is likely that there's another box still selected in the HTML; you can't select two so what the browser does is up to it.

You need to do something like:
{xen:if $resource.resource_id, {xen:checked '{$resourceType} == "fileless"'}, ' checked="checked"'}
For each option. (Note not that exact code; it needs to be modified for each option and only the fileless option should fallback to checked=checked.)