# Template module

**URL:** https://farmos.discourse.group/t/template-module/2054
**Category:** Using farmOS
**Tags:** feature-request
**Created:** [June 21, 2024, 9:14am UTC](https://farmos.discourse.group/t/template-module/2054 "2024-06-21T09:14:11Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![paul121](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@paul121](https://farmos.discourse.group/u/paul121)
#### Post date: [June 21, 2024, 9:14am UTC](https://farmos.discourse.group/t/template-module/2054/1 "2024-06-21T09:14:11Z")

</div>

Happy to share that the Template module we have been working on is ready for review and testing! 😄

_Note: This module is not ready for production! Please do not install it on your production farmOS instances. I expect there to be a few more breaking changes as we test things out._

- I’ve prepared some documentation (still a wip): [Farm Template](https://project.pages.drupalcode.org/farm_template/)
- To test, you can use the [farmOS demo site](https://farmos-demo.rootedsolutions.io/). First enable the `farm_template` module from the setup page and then go to Setup → Templates to get started

This module provides a new concept of templates for use within farmOS. Templates make it faster and easier to create consistent Asset and Log records that follow a standard data convention. The goal is that no code is required - you can build templates via the UI specific to your data needs and use-case. In some ways this is also like “building a quick form” for simple asset + log records.

I’ve put a lot of thought into the structure of this base template config entity. You can use the template by itself to create records but things get more exciting as you use the same template in other places… for this scope of work we have two things in the works:

- Create quick forms from a template and further configure the quick form with overridden default values for that specified template. This allows you to re-use templates multiple times but hard-code specific values to make quick forms even more streamlined. **This is done and needs to be tested!**
- Use templates in plans. The idea is that you want to configure a plan at the beginning of the year with various templates for the actions to take throughout the year, perhaps on a recurring schedule. The plan will house the templates/logs and track progress. Templates can be re-used across plans. **Some of this is implemented but needs more work**

I’m excited and curious to hear about other ways that templates can be used… a couple I have in mind:

- Use templates via the API to build mobile frontends for very quick, custom data entry
- Create a data stream notification plugin that submits a template when certain conditions are met. Eg: auto-create an activity log when the weather gets bad

I’ll use this thread to post updates over the next few weeks as I continue to work through these last features. Let me know if you are able to test and have any feedback. I’m also tracking issues and tasks for this module on the drupal project page: [https://www.drupal.org/project/farm\_template](https://www.drupal.org/project/farm_template)

---

_[View the full topic](https://farmos.discourse.group/t/template-module/2054)._
