Difference between revisions of "Sandbox9"

From MarineLives
Jump to: navigation, search
Line 1: Line 1:
 
'''This sandbox page is for practising creating and using Templates and Forms'''
 
'''This sandbox page is for practising creating and using Templates and Forms'''
 +
----
 +
__TOC__
 +
 +
==Useful tuition pages==
 +
 +
See [https://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_forms Extension:Semantic Forms/Defining forms]
 +
 +
- This page explains 'for templat' tag, 'end template' tag, 'field' tag, 'section' tag, and 'standard input' tag
 +
- PParticularly useful tips are:
 +
-- Use of default= in 'field' tag
 +
-- Use or rows=, columns= to determine size of text boxes, ditto 'autogrow'
 +
 +
----
 +
==Problem with Forms?==
  
 
Rowan (and Thierry) - Is there a problem with how Semantic Forms has been implemented, or am I making a mistake?
 
Rowan (and Thierry) - Is there a problem with how Semantic Forms has been implemented, or am I making a mistake?

Revision as of 12:24, July 28, 2016

This sandbox page is for practising creating and using Templates and Forms



Useful tuition pages


See Extension:Semantic Forms/Defining forms

- This page explains 'for templat' tag, 'end template' tag, 'field' tag, 'section' tag, and 'standard input' tag
- PParticularly useful tips are:
-- Use of default= in 'field' tag
-- Use or rows=, columns= to determine size of text boxes, ditto 'autogrow'



Problem with Forms?


Rowan (and Thierry) - Is there a problem with how Semantic Forms has been implemented, or am I making a mistake?

I have done the following:

(1) Created a set of properties, which I have defined as either Text, Page or Date, as appropriate

(2) Used Special:CreateTemplate to create a simple Infobox style template for use on my trial semantic biography pages

- I have named the Template "SemBioLongInfoBoxTwo"
- The template has two columns and sixteen rows
- The first column lists the Property; the second column lists the Value of that Property
- I have not mastered how to suppress the rows if the value is blank, so the Infobox is quite large and has blanks when filled out

The Template is called in the format

{{SemBioLongInfoBoxTwo
|Person=
|Title=
|First name=
|Last name=
|Suffix=
|Occupation=
|Training=
|Citizen=
|Literacy=
|Birth year=
|Birth place=
|Res street=
|Res parish=
|Res town=
|Res county=
|Deposition start page=
}}

(3) Used Special:CreateForm to create a simple Semantic Form to fill out the Template [1]

- I have named the Form "SemBioLongInfoBoxTwo"
- When I inspect the Form after its is generated and before saving, the sixteen row items appear with the correct labels, and mainly with the correct input types (Text with autocomplete (default)", and in the case of the Field:"Birth year" (Date (default)
- However, the Field: Res county shows as Input type "Transcription (default). I think "Transcription (default) is coming over from either a Template or Form which Rowan created when he set up the MarineLives wiki, though for the life of me I don't see how the way I have set up the Property:Res county is triggering this default. (CSG, 27/07/2016, 10.04 a.m.: This problem is now reslved - the "Property:Res county" was wrongly set to "Text" and should have been set to "Page", which I have now changed and this resolves this specific issue)

Extract from SemBioLongIndoBoxTwo Form prior to saving

- A second problem occurs after I save the Form and then try to create a new semantic biography page using the Form (which calls on the associated template)
- My test page is for the grocer "James Jauncy of the parish of Saint Lawrence Jury London citizen and Grocer of London aged 34 yeares"[1]
- I name the page "James Jauncy"
- As you can see from the image below, the blank form generated contains sixteen rows, but the label "Title" has been replaced by "Deposition start page". All the other labels are correct, but "Title" is replaced by "Deposition start page", despite "Deposition start page" being in its correct position as the last row.

Create new page James Jauncy using SemBioLongIndoBoxTwo Form (and associated template)

- After filling out the form, I inspected the filled out form in Preview, and miraculously the label "First name" has reappeared in the correct place
- You can see the finished page at: http://www.marinelives.org/wiki/James_Jauncy
- I had to add the Category:Semantic biography, but I think that can be generated automatically
- I also added in the command, but as on a number of pages I have created this magic word doesn't work with the James Jauncy page - it is a mystery to me why, since it is a simple page
- If you browse the semantic properties you will see that they have been created correctly: http://www.marinelives.org/wiki/Special:Browse/James_Jauncy

Preview the creastion of James Jauncy page once data is filled in
  1. HCA 13/72 f.463v