Closed kennsippell closed 3 months ago
Togo also wants an autogenerated name
and to provide first_name
last_name
Requirement for Togo:
2 or more villages with the same name. Can we associate the name of the village with the name of its parent to facilitate the search
Hey @inromualdo, since you offered to take this on - I thought I'd share some quick thoughts.
I'm imagining config.json like this, where parameter
is a liquidjs
template hydrated with some data like place, contact, parent
. I haven't thought it through a ton, but I'd be curious to hear how it goes for you!
Kenya
{
"friendly_name": "CHP Area Name",
"property_name": "name",
"type": "generated",
"parameter": ["{{ place.name }} Area"],
"required": true
}
Togo
{
"friendly_name": "CHW Name",
"property_name": "name",
"type": "generated",
"parameter": ["{{ place.first_name }} {{ place.last_name }}"],
"required": true
}
Uganda
{
"friendly_name": "VHT Area Name",
"property_name": "name",
"type": "generated",
"parameter": ["{{ contact.name }} Area ({{ place.village }})"],
"required": true
}
Togo
{
"friendly_name": "Village Name",
"property_name": "name",
"type": "generated",
"parameter": ["{{ place.name }} ({{ parent.name }})"],
"required": true
}
In the formview, instead of displaying a text input we probably just want to display nothing and rely on generation.
@kennsippell This is a good idea. We could display a text/label in the formview