Menu

Blog

Read about our DNN modules and themes

9665

EasyDNNnews - Custom fields

EasyDNNnews 6.0 brings you the possibility to create custom fields in articles. Custom fields in the EasyDNNnews module are organized in groups enabling different groups of fields to be used with different types of articles. E.g. the Event group of custom fields for events and the Article group for regular articles.

All custom fields are available through the common token - [EDNcf:ShowAll], but each custom field can also be accessed individually by its token. Tokens for each custom field are visible in the module interface. The common token is added in the all HTML templates, but it can be replaced with tokens for each field.

These are the necessary steps for using custom fields in EasyDNNnews module:
  1. Create custom fields
  2. Currency setup (if necessary)
  3. Create groups and add custom fields to them
  4. Adjust settings for custom fields (Settings > 19. Custom fields)
1) How to create custom fields

Custom fields can be created in Dashboard > Custom fields
Image

The following types of custom fields are possible to create: 
    • Textbox
      • Text
      • Rich Text (HTML)
      • Integer
      • Decimal
    • Money
    • Checkbox
    • MultiControls
      1. Drop Down list 
      2. Radio Button list 
      3. Checkbox list 
Image

Instructions for creating a basic Texbox > text field

Image

Control basic setup
Name – the name of the custom field
Token ID – an unique token for the custom field
Default value – the default value of the field

Control label options
Show label – when this option is ON then the label is displayed in the view mode
Field label – the text of the label
Field help text – the text of the help label

Validation
Field required – when this option is ON then the field is required
Error message – the text of the error message

Other options
Active – if this option is ON then the field is visible in the add/edit form
Hide field – if this option is ON then the field is not visible in the view mode, it is visible only when editing an article. This only applies to the common token.

 

2. Currency setup
If the type of a custom field is money, then is necessary to set the default currency. If more than one language is used on the portal, then is also necessary to set the currency for each language and their exchange rates. 
 

Image

3. Creating of a Custom field group 
After creating of custom fields it is necessary to create a group and add custom fields in it. It is possible to create more groups and all custom fields are available for adding in all groups.

Creating of a group
Image

Name – the name of the group
Description – the description of the group

Once the group is created, it is necessary to add the previously created custom fields to this group (Edit custom fields group). To add a custom field to the group, it is necessary to click on the link „Add to group“. Then the custom field is no longer on the list of available fields for adding to the group, but it displayed on the list of fields in the group. The custom field can be removed from the group by clicking on the link “Remove from group”
 
 4. Custom fields settings

Settings > 19. Custom fields

Image
 
Here you can set which custom fields group will be default, possibility of selecting custom fields groups when adding an article and how the panel with custom fields will be displayed (opened, closed or without possibility of closing the panel).

 

 

Custom fields in the edit form

Image

 

Custom fields in an article

Image
EasyDNNsolutions
Contact author

EasyDNNsolutions Other posts by EasyDNNsolutions

EasyDNNsolutions

Contact author

x

Subscribe to our Blog