ACT controls

multi

{
	"name" 	 : "variableName",
	"label"	 : "label",
	"type"	 : "multi",
	"search" : "wikidata",
	"base" : {
	  "type"   : "complex",
	  "fields" : [
		  { "@type" : "Place"  },
		  { 
			  "name"	: "fieldVarName",
			  "value"	: "title",
		  },
		  {
			  "name" 	: "fieldVarName2",
			  "value"	: "val",
			  "clss" 	: "hidden",
		  },
	  ],
	},
}

fields

  • if you have a field that has a ‘@type’ property, it will converted to a hidden field with the name ‘@type’ and the value of the ‘@type’ propery.
  • if there is a search property on the main field, the value property will take the corresponding property from search result if exists (eg: result[‘title’] if the value is ‘title’)

search

  • a searchbox will be added to allow you search for the specified data
  • wikidata returns the following properties: id, url, title
  • pages and posts return the following properties: id, url, title

Search

{
	"name" 		: "variableName",
	"search"	: "wikidata",
	"result"	: "url",
}
{
	"name" 		: "variableName",
	"search"	: "wikidata",
	"result"  : {
		"variableName" : "url",
		"varName2"     : "title",
	}
}
  • the main field will be a searchbox.
  • In the first example it will give the url of the search result as value to variableName
  • In the second example it will also populate the value of the varName2 variable

Extras

{
	"name" 		: "variableName",
	"type"		: "input",
	"wikidata"	: true,
	"result"	: "title"
}

wikidata

  • a wikidata button will allow you to populate the main field (in the example an input) with the search result property indicated on result.

Leave a Reply

Your email address will not be published. Required fields are marked *