K2 is a popular extension to build sites with CCK capabilities. Its flexibility makes it possible to add custom fields to manage additional text, images, links, etc.
In this tutorial, you will learn how to create extra fields within your K2 items.
Step #1. Create the Extra fields group
- Go to Components
- Extra fields groups
- Type a Group name
- Save and close
Step #2. Create Extra fields
- Go to Components > K2 > Extra fields
- Click New
Enter the required details:
- Group. Choose the one you just created in the previous step.
- Type. You can choose from the available field types:
- Text field
- Text area
- Drop-down selection
- Multi-select list
- Radio buttons
- CSV data
- Searchable labels
- Required. Set as "yes" if this field is mandatory.
- Set a Default value if needed
- Save and close when you’re done.
Repeat the process to add more fields.
Step #3. Assign the Extra fields group to a category
Let's connect the extra fields group with a K2 category:
- Components > K2 > Categories
- Edit or create a category
- Associated "Extra Fields Group". Select the one you created in step 1.
- Click "Save & Close".
Step #4. Create a K2 item
- Create a K2 item through Components > K2 > Items > New
- Set a title
- Choose the category
- Look in Extra Fields tab to fill in the custom fields:
Save these changes when you're finished.
Step #5. Check the end result
Go to your public site to confirm the extra fields are indeed working.
Save $1000's when you sign up to the Everything Club today! You' ll get access to all our extensions, templates, and Joomla training.