RuneScape:Calculators/Form calculators/Tests
- This is a page for testing MediaWiki:Gadget-calc.js.
To properly test the calculators remember to delete the localStorage for the calculator input values. The calculators on this page all have keys beginning with rsw-calcsdata-fct-
Contents
Parameter tests[edit source]
article[edit source]
![]() |
Templates used |
---|
FormCalcTests/article |
This tests that search suggestions are enabled on article fields using {{FormCalcTests/article}}
.
template = Template:FormCalcTests/article form = fct-article result = fct-article-res autosubmit = disabled suggestns = 0 param = page|article (autocomplete)||article|||This is restricted to pages in the main namespace. Validates on submit. param = page2|string (no autocomplete)||string
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
number[edit source]
![]() |
Templates used |
---|
FormCalcTests/number |
This tests that numbers outside a specific range are recorded as errors using {{FormCalcTests/number}}
template = Template:FormCalcTests/number form = fct-number result = fct-number-res autosubmit = disabled param = num|Number (out of range)|10|number|0-5.5||Range specified is 0-5.5 param = num2|Number (within range)|3|number|0-5.4||Range specified is 0-5.4
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
int[edit source]
![]() |
Templates used |
---|
FormCalcTests/int |
This tests that integers outside a specific range and decimals are recorded as errors using {{FormCalcTests/int}}
template = Template:FormCalcTests/int form = fct-int result = fct-int-res autosubmit = disabled param = int|Int (out of range)|10|int|0-5||Range specified is 0-5 param = int2|Int (within range)|3|int|0-5||Range specified is 0-5 param = int3|Int (decimal)|4.2|int
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
select[edit source]
![]() |
Templates used |
---|
FormCalcTests/select |
This tests the select input with and without a default value using {{FormCalcTests/select}}
template = Template:FormCalcTests/select form = fct-select result = fct-select-res autosubmit = disabled param = select|Select (a-z)|f|select|a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z param = select2|Select (a-z) (no default)||select|a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z param = select3|Select (with html entities)||select|don't,fish & chips,"quoted",what?,5 <= 6
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
buttonselect[edit source]
![]() |
Templates used |
---|
FormCalcTests/select |
This tests the buttonselect input with and without a default value using {{FormCalcTests/select}}
template = Template:FormCalcTests/select form = fct-buttonselect result = fct-buttonselect-res autosubmit = disabled param = select|Select (a-z)|f|buttonselect|a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z param = select2|Select (a-z) (no default)||buttonselect|a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z param = select3|Select (with html entities)||buttonselect|don't,fish & chips,"quoted",what?,5 <= 6
combobox[edit source]
![]() |
Templates used |
---|
FormCalcTests/select |
This tests the combobox input with and without a default value using {{FormCalcTests/select}}
template = Template:FormCalcTests/select form = fct-combobox result = fct-combobox-res autosubmit = disabled param = select|Select (a-z)|f|combobox|a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z param = select2|Select (a-z) (no default)||combobox|a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z param = select3|Select (with html entities)||combobox|don't,fish & chips,"quoted",what?,5 <= 6
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
check[edit source]
![]() |
Templates used |
---|
FormCalcTests/check |
This tests the checkbox input for default and custom true-false values using {{FormCalcTests/check}}
template = Template:FormCalcTests/check form = fct-check result = fct-check-res autosubmit = disabled param = check|Check (true/false)||check param = check2|Check (zero/one)||check|1,0
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
toggleswitch[edit source]
![]() |
Templates used |
---|
FormCalcTests/check |
This tests the toggleswitch input for default and custom true-false values using {{FormCalcTests/check}}
template = Template:FormCalcTests/check form = fct-toggleswitch result = fct-toggleswitch-res autosubmit = disabled param = check|Check (true/false)||toggleswitch param = check2|Check (zero/one)||toggleswitch|1,0
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
togglebutton[edit source]
![]() |
Templates used |
---|
FormCalcTests/check |
This tests the togglebutton input for default and custom true-false values using {{FormCalcTests/check}}
template = Template:FormCalcTests/check form = fct-togglebutton result = fct-togglebutton-res autosubmit = disabled param = check|Check (true/false)||togglebutton param = check2|Check (zero/one)||togglebutton|1,0
hs[edit source]
![]() |
Templates used |
---|
FormCalcTests/hs |
This tests the hs parameter type using {{FormCalcTests/hs}}
template = Template:FormCalcTests/hs form = fct-hs result = fct-hs-res autosubmit = disabled suggestns = 0 param = hs|Player name||hs|attack,1,1;defence,2,1; param = attack|Attack level|1|int param = defence|Defence level|1|int
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
rsn[edit source]
![]() |
Templates used |
---|
FormCalcTests/rsn |
This tests the rsn parameter type using {{FormCalcTests/rsn}}
template = Template:FormCalcTests/rsn form = fct-rsn result = fct-rsn-res autosubmit = disabled suggestns = 0 param = rsn|Player name||rsn
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
fixed[edit source]
![]() |
Templates used |
---|
FormCalcTests/fixed |
This tests the fixed parameter type using {{FormCalcTests/fixed}}
template = Template:FormCalcTests/fixed form = fct-fixed result = fct-fixed-res autosubmit = disabled suggestns = 0 param = fixed|Fixed|fixed|fixed param = string|String|changeable|string
This text will disappear if the form is loaded properly.
|
This text will disappear if the form is submitted.
|
[edit source]
![]() |
Templates used |
---|
FormCalcTests/semihidden |
This tests the semihidden input and custom true-false values using {{FormCalcTests/semihidden}}
template = Template:FormCalcTests/semihidden form = fct-semihidden result = fct-semihidden-res autosubmit = disabled param = semi|Semihidden (hidden)|hidden|semihidden param = string|String (shown)|shown|string
To fully test this input:
- Submit once to see the output as "hidden"
- Paste the following js into your console:
$('#fct-semihidden-fct-semihidden-res-semi input').val('changed');
- Submit again and see the output as "changed
XSS tests[edit source]
Click here to view an older revision that contains XSS tests.
They were removed from this page because Cloudflare blocks previewing and saving the page with the content that potentially allows for XSS.