Sandbox9

From MarineLives
Revision as of 09:02, July 27, 2016 by ColinGreenstreet (Talk | contribs)

Jump to: navigation, search

This sandbox page is for practising creating and using Templates and 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
- I have defined the datatype of Res county as "Text", which can be seen by inspecting Property:Res county [2]

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 "Depsotion start page" being in its correct position as the last row.
- You will also see that because the Form is treating "Res county" as "Transcription (defualt)", it has generated the wrong shaped box. When I type text into this "Res county" box it is clear the autofill feature is witched off, whereas it is on for all the other properties defined with Text datatypes

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
- I ran into problems with the Bith Year becasue I only had the year, not the day and month, and the Form set the default of Date to MMMM/DD/YYYY. I think I had the option just to select Year in the Form against the Property. Interestingly, when you create the page manually without the Form, the system is more forgiving - because the Property is defined as "Has form:Date" it accepts just a year! I fudged the issue by entering January (since there was no option of no month), but got away without entering a day of the month.
- 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 mysery 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