Note: You are currently viewing documentation for Moodle 2.5. Up-to-date documentation for the latest stable version of Moodle may be available here: Dataform Fields.

Dataform Fields: Difference between revisions

From MoodleDocs
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Dataform}}
{{Dataform}}
Each entry in a dataform activity consists of a set of information elements of one or more types depending on the nature of the activity. These information elements are called fields and they are the means for adding and viewing content in the activity.  
Each entry in a dataform activity consists of a set of content elements of one or more types depending on the purpose of the activity. These content elements are called fields and are the means for adding and viewing content in the activity.  


==Field types==
==Fields management==
===Internal fields===
In the Manage -> Fields tab you can add new fields or edit/set up existing fields.
The Dataform has a few internal fields which can be used to display internal entry and user information such as the time the entry was created or modified, the author's name or picture etc. These fields have only one instance that is created automatically by the Dataform. They cannot be added or deleted in the fields list. They can be used for filtering.


====_Entry====
[[Image:df-fields-list.png|frame|left|Dataform views list]]<br clear="both" />


====_Time====


====_User====


====_Group====
===Add a field===


====_Approve====


====_Comment====
===Edit a field===


====_Rating====
Action button for editing the field settings.


===User-defined field types===
===Field visibility===
The Visible setting determines who can see the field content. A field can be visible to everyone, to entry owner and managers, or to managers only. This can be set either from the field form or by clicking the eye icon of the field, each click moves the setting to the next mode.


====Checkbox====
===Field locking===
 
Editable: The Editable setting determines whether the entry owner can edit the field content. When the field is locked the entry owner cannot edit the field content when editing the entry. Users with manageentries capability can edit the field regardless of this setting.
This allows you to offer checkboxes for the user to select. Add the options one under the other. The word will appear next to a checkbox when the user clicks to add an entry. They can check more than one box.
Date
 
This allows a user to enter a date by picking a day, month and year from a drop down list.
File
 
Users can upload a file from their computer. If it is an image file then the picture field may be a better choice.
Select
 
The text entered in the options area will be presented as a drop-down list for the user to choose from. Each line become a different option.
Select multiple


The text entered in the options area will be presented as a list for the user to choose from and each line become a different option. By holding down control or shift as they click, users will be able to select multiple options. This is a fairly advanced computer skill so it may be wise to use multiple checkboxes instead.
===Duplicate fields===
Number
Action button for duplicating one or more fields. To duplicate more than one field select the desired fields by ticking their checkboxes and click the duplicate button in the table header row.


This allows users to enter any number. For example:
===Delete fields===
Action button for deleting one or more fields. To delete more than one field select the desired fields by ticking their checkboxes and click the delete button in the table header row.


    42
==Field settings==
    -1000
    0
    0.123
    3.0e8


(For those who care about the technical details, the field stores floating point numbers.)
[[Image:df-field-general-settings.png]]
Picture


This allows a user to upload and display an image file.
See [[Dataform Field Types]] for settings of particular field types.
Radio buttons


The user gets radio buttons and can choose only one. They can only submit the entry when they have clicked on one button. (Note:If you only have two options and they are opposites (true/false, yes/no) then you could simply use a single checkbox instead. However checkboxes default to their unchecked status and so people could submit without actively selecting one of the options. This may not always be appropriate.)
==Field patterns==
Text


Users can enter one-line pain text. For multi-line text, or for text that requires formatting such as headers and bullet points, you can use a text area field.
===Built-in patterns===
Text area
The Dataform offers several field-like built-in patterns that may be used in views in a similar way to type-specific patterns and allow for displaying entry actions and information, such as the entry author and group info. These patterns are typically enclosed in double hash characters as in ##tag-name##.


This allows users to enter a long piece of text using the text editor.
[[Image:df-patterns-internal-action.png]]
Url


The user can add a link to a website here. If you select autolink then the URL becomes clickable. If you also enter a forced name for the link then that text will be used for the hyperlink. For example in a dataform of authors you may wish people to enter the author's website. If you enter the text 'homepage' as a forced name then clicking on text "homepage" will take you to the entered URL.
[[Image:df-patterns-internal-ref.png]]
User custom info


The user info field allows for displaying in an entry custom user profile info.
[[Image:df-patterns-internal-time.png]]


Fields management
[[Image:df-patterns-internal-author.png]]


In the Manage -> Fields tab you can add new fields or edit/set up existing fields.
[[Image:df-patterns-internal-group.png]]


Visible: The Visible setting determines who can see the field content. A field can be visible to everyone, to entry owner and managers, or to managers only. This can be set either from the field form or by clicking the eye icon of the field, each click moves the setting to the next mode.
===Type-specific patterns===


Editable: The Editable setting determines whether the entry owner can edit the field content. When the field is locked the entry owner cannot edit the field content when editing the entry. Users with manageentries capability can edit the field regardless of this setting.
See [[Dataform Field Types]] for patterns of particular field types.
 
Edit: Action button for editing the field settings.
 
Duplicate: Action button for duplicating one or more fields. To duplicate more than one field select the desired fields by ticking their checkboxes and click the duplicate button in the table header row.
 
Delete: Action button for deleting one or more fields. To delete more than one field select the desired fields by ticking their checkboxes and click the delete button in the table header row.
 
Select: For multiple fields for bulk action (duplicate or delete). To select all or none of the fields tick or untick the checkbox in the table header row.
==Fields management==
===Add a field===
===Edit a field===
===Other field operations===

Latest revision as of 17:16, 5 October 2012

Each entry in a dataform activity consists of a set of content elements of one or more types depending on the purpose of the activity. These content elements are called fields and are the means for adding and viewing content in the activity.

Fields management

In the Manage -> Fields tab you can add new fields or edit/set up existing fields.

Dataform views list



Add a field

Edit a field

Action button for editing the field settings.

Field visibility

The Visible setting determines who can see the field content. A field can be visible to everyone, to entry owner and managers, or to managers only. This can be set either from the field form or by clicking the eye icon of the field, each click moves the setting to the next mode.

Field locking

Editable: The Editable setting determines whether the entry owner can edit the field content. When the field is locked the entry owner cannot edit the field content when editing the entry. Users with manageentries capability can edit the field regardless of this setting.

Duplicate fields

Action button for duplicating one or more fields. To duplicate more than one field select the desired fields by ticking their checkboxes and click the duplicate button in the table header row.

Delete fields

Action button for deleting one or more fields. To delete more than one field select the desired fields by ticking their checkboxes and click the delete button in the table header row.

Field settings

df-field-general-settings.png

See Dataform Field Types for settings of particular field types.

Field patterns

Built-in patterns

The Dataform offers several field-like built-in patterns that may be used in views in a similar way to type-specific patterns and allow for displaying entry actions and information, such as the entry author and group info. These patterns are typically enclosed in double hash characters as in ##tag-name##.

df-patterns-internal-action.png

df-patterns-internal-ref.png

df-patterns-internal-time.png

df-patterns-internal-author.png

df-patterns-internal-group.png

Type-specific patterns

See Dataform Field Types for patterns of particular field types.