User:Hazeldee0512/My sandbox3
Appearance
Intro goes here
Helpful links
[edit]-
- Linking to forms
- Properties and types
- Inline queries - using the ask and show parser functions for queries
- SMW quick reference
- Create class - quickly create properties, forms, templates and category pages
Fields with multiple values
[edit]
Form code |
{{{field|AddContributor|holds template}}} |
PLACE WHERE THE QUESTION SHOULD APPEAR IN THE FORM |
---|---|---|
{{{for template|SuccessContributor|embed in field=Success story[AddContributor]|label= Name(s) of key contributor(s)|multiple|add button text=Add a contributor}}}
{{{field|contributor1|input type=text|}}}
{{{end template}}}
{{{for template|"NewTemplateName"|embed in field="MainTemplateName[MainTempleVariableName]"|label= Name(s) of key contributor(s)|multiple|add button text=Add a contributor}}} {{{field|NewTempleVariableName"|input type=text|}}} |
PLACE AT THE END OF FORM CODE AFTER THE "end template" TAG |
Defining a page name
[edit]- Two-step process
- uses #forminput
- user inputs a page title
- doesn't override an existing page
- opens the "edit with form" edit box if page already exists
- One-step process
-
- uses #formlink
- includes just a "create page" button
- Defining a page name from the input that is directly on the form page (before completing the form)
Adding an "Add" button to a form
[edit]1. Code used in the form:
- {{field|AddFieldName|holds template}}
- AddFieldName = the name of the field that will be used within the Main template that formats the form page. This is placed where you want the "Add" button to appear.
- {{for template|AddTemplateName|embed in field=MainTemplateName[AddFieldName]|label=Text that appear on form|multiple|add button text=Text that appears on button}}}
- AddTemplateName = the name of the template that will hold code for the field that is being used on the form.
- This code can be placed at the bottom of the form code, but muas it want appear
- {{{end template}}}
- This should to be placed at the end of the form code, but must appear after the template in which it will be embedded.
2. Code used in the AddTemplate:
- This template code uses the field names that given between for template and end template
3. Code used in the MainTemplate:
- This template code uses the AddFieldNames that given in {{field|AddFieldName.... in the form code.
Query links
[edit]- SuccessQuery {{#queryformlink:form=SuccessQuery|link type= button|link text=Click to query all Success Stories|new window}}
- KSU query {{#queryformlink:form=KSU query|link type= button|link text=Click to query all KS training|new window}}
Examples
[edit]Creating a query
[edit]Properties
[edit]What you type | What you see |
---|---|
Classify a [[Example property::link]] with the property "example property."
|
Classify a Example property::link with the property "example property." |
- Example
OneWiki change requests::PHP upgrade
[[#ref_{{{1}}}|^]] NOTE: The word "link" appears as a red link because the property does not exist. The PHP upgrade does not appear as a red link, because the "OneWiki change requests" is an existing property.
Testing script items
[edit]Application | Test condition description | Procedure number | Test procedure | Input data | Expected results | Results | Comments |
---|---|---|---|---|---|---|---|
Properties | Creating a new property (Page) | From the "Special pages" page, under the "Semantic Forms" section click the "Create a property" link. | Special:SpecialPages | The "Create a property" page is open. | |||
Input the following in each box
|
|||||||
Defining an in-text annotation | |||||||
Defining an in in-text annotation with alternate text | |||||||
Defining a hidden in-text annotation | |||||||
Queries | Querying on a single property values | ||||||
Querying on multiple property values |
Forms
[edit]Task | Test condition description | Procedure number | Test procedure | Input data | Expected results | Results | Comments | |
---|---|---|---|---|---|---|---|---|
Create a form | Defining the form: | Page | ||||||
Layout | ||||||||
Input types | ||||||||
Previewing the form layout | ||||||||
Create a page using a form | ||||||||
Edit a page using a form | Text fields |