1. 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)

Discussion in 'Resource Manager Support' started by reddy ink, Dec 22, 2015.

  1. reddy ink

    reddy ink Active Member

    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>
  2. Mike

    Mike 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.)

Share This Page