Template:FormDateField

From Encyclopedia of Scientonomy
Revision as of 21:15, 1 June 2020 by Dan (talk | contribs)
Jump to navigation Jump to search

This template is called from within Semantic Forms to display a Date field.

NOTE: This is a "form" template; it should NOT be called from anywhere except a semantic form.

It creates the following entry fields:

  • {{{property|}}} Era - CE or BCE; the default is CE.
  • {{{property|}}} Year - the year field; accepts 4 integers.
  • {{{property|}}} Month - the month field.
  • {{{property|}}} Day - the day field.
  • {{{property|}}} Approximate - if day field.

Parameters:

  • |property= - the name of the property; must be unique for the form. The template will use this value to create several fields ending with Year, Month, Day, etc.
  • |mandatory= - if yes, then the combined field return some value. The default is no.
  • |dataprecision= - Year, Month, or Day. Depending on this parameter, the respective fields will be made mandatory. The default is Day.
  • |showera= - if yes, then the era will be show; if no (default), then the era field will not be shown and the value of CE will be set automatically.
  • |showapproximate= - if yes, the approximate field will be shown; if no (default), then the approximate field will not be shown and the date will be considered not approximate (i.e. precise).
  • |showmonthdayfields= - if yes (default), the Month and Day fields will be shown even if dataprecision=Year. If no, the Month and Day fields will only be shown if necessary.
  • |showcaptions= - if yes (default), the captions (Year, Month etc.) will be shown.
  • |adddefualt= - if yes, the date fields will have the value of now by default. If no (default), no default will be added to the fields.