Friends 1.x

Legacy documentation for Friends 1.x.

The Friends:Message_Folder_Form function is part of the Private Messaging system and allows your users to add, edit or delete existing Folders.

{exp:friends:message_folder_form} content {/exp:friends:message_folder_form}

Parameters

The following parameters are available for use:

return=

return="friends/messages"

This parameter allows you to return the user to a specified template upon successful submittal of form.

Variables

The following variables are available for use:

friends_message_folder

{friends_message_folder}

This variable outputs the name of the message folder (Inbox, Sent, etc).

friends_message_folder_id

{friends_message_folder_id}

This variable outputs the ID of the message folder.

Variable Pairs

The following variables are available for use:

friends_message_folders

{friends_message_folders} {/friends_message_folders}

This variable pair is required and controls the formatting of the message folder list for editing.

Form Fields

The following form_fields are available for use:

friends_message_folder_id[]

<input
    name="friends_message_folder_id[{friends_message_folder_id}]"
    value="{friends_message_folder}"
/>

This form field is how your users can add, edit or delete existing Message Folders. Follow structure as noted in above example.

Examples

The example code below will output a list of all message folders available to the user:

<h3>Add, Edit or Delete Folders using the form below:</h3>

{exp:friends:message_folder_form
    return="friends/messages"
}

    <ul>
    {friends_message_folders}
        <li>
            <input name="friends_message_folder_id[{friends_message_folder_id}]" value="{friends_message_folder}" />
        </li>
    {/friends_message_folders}
    </ul>

    <input type="submit" name="submit" value="Submit" />

{/exp:friends:message_folder_form}