Resource Upload Form

Use our Forums to find examples and answers to your questions. If you have advanced requirements for your project, contact us and our staff can help you find a solution.

hccdevelopment

Resources Upload Form

Use the Resource Upload Form to add or edit your resources from a template. This tag incorporates the Stand Alone Entry Form (SAEF) tag. So, all SAEF parameters and variables are available with the Resource Upload Form tag.

{exp:resources:resource_form entry_id="{segment_3}" ajax="yes"

Parameters

entry_id="2" 

Set this to weblog entry_id of the resource.

resource_id ="4" 

Set this to the resource id.

ajax_form ="yes" 

Set to "yes" to make the form AJAX submit.

Variable Pairs

Use these variable pairs to display form fields for the resources details:

{resource_groups}
    
<label>{field_label}</label>
    <
select name="{field_name}">
    
{options}
    
<option value="{option_value}"{option_select}>{option_name}</option>
    
{/options}
    
</select>
{/resource_groups} 

Displays a list of your Resource Groups in a selector box. This is a required field to make a resource entry.

{resource_type}
    
<label>{field_label}</label>
    <
select name="{field_name}">
        
{options}
        
<option value="{option_value}"{option_selected}>{option_name}</option>
        
{/options}
    
</select>
{/resource_type} 

Displays a list of your resource types, (i.e. Audio, Video etc..) in a selector box.

{resource_save_revision}
    
<label>{option_name}</label>
      
{options}
    
<input type="radio" name="{field_name}" value="{option_value}" />
      
{/options}
{
/resource_save_revision} 

Displays radio buttons to save the file with revisions. Yes or No

{resource_url}
    
<label>{field_name}</label>
     
{options}
    
<input type="textarea" name="{field_name}" value="{field_value}" />
     
{/options}
{
/resource_url} 

Displays a text area into which to insert the URL for a web based resource. We use a text area for ling URL's.

{resource_max_downloads}
    
<label>{field_name}</label>
     
{options}
    
<input type="text" name="{field_name}" value="{field_value}" />
     
{/options}
{
/resource_max_downloads} 

Displays a text field into which to insert the max number of downloads allowed for your resources.

{resource_auth_code}
    
<label>{field_name}</label>
     
{options}
    
<input type="text" name="{field_name}" value="{field_value}" />
     
{/options}
{
/resource_auth_code} 

Displays a text field into which to insert a password for your resources, if you chose to make it password protected.

{resource_comment}
    
<label>{field_label}</label>
    <
textarea id="{field_name}" name="{field_name}" dir="rtl" cols="50" rows="6">{field_value}</textarea>
{/resource_comment} 

Displays a text area into which to insert comments for your resources.

{resource_userfile}
    
<label>{field_label}</label>
        <
input type="file" name="{field_name}" value="" />
{/resource_userfile} 

Displays a file upload text field and button.

Form Example - This example assumes the entry_id, if editing an entry, is in the third segment within the URL.

{exp:resources:resource_form entry_id="{segment_3}" ajax="yes"}

<p>Title<br />
<
input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" onkeyup="liveUrlTitle();" /></p>

<
p>URL Title<br />
<
input type="text" name="url_title" id='url_title' value="{url_title}" maxlength="75" size="50" /></p>
<
p>{resource_groups}
    
<label>{field_label}</label>
    <
select name="{field_name}">
    
{options}
    
<option value="{option_value}"{option_select}>{option_name}</option>
    
{/options}
    
</select>
{/resource_groups}
</p>
<
p>
{resource_type}
    
<label>{field_label}</label>
    <
select name="{field_name}">
        
{options}
        
<option value="{option_value}"{option_selected}>{option_name}</option>
        
{/options}
    
</select>
{/resource_type}
</p>
<
p>
{resource_userfile}
    
<label>{field_label}</label>
        <
input type="file" name="{field_name}" value="" />
{/resource_userfile}
</p>

<
p>
{resource_comment}
    
<label>{field_label}</label>
    <
textarea id="{field_name}" name="{field_name}" dir="rtl" cols="50" rows="6">{field_value}</textarea>
{/resource_comment}
</p>
{/exp:resources:resource_form} 


Join our Mailing List