Sandbox91
From Metabolomics.JP
(Difference between revisions)
Line 60: | Line 60: | ||
--%% あらかじめセットしてあるデータの場合は、チェックを付けておく - データは&&区切りで渡す %%-- | --%% あらかじめセットしてあるデータの場合は、チェックを付けておく - データは&&区切りで渡す %%-- | ||
− | + | if(string.match("{{#get:initset}}", "" .. list[i] .. "", 0) == nil) then | |
− | + | ||
− | + | ||
− | + | ||
checked = '' | checked = '' | ||
+ | else | ||
+ | checked = ' checked="yes"' | ||
end | end | ||
Line 70: | Line 69: | ||
if(flag[i] == 1) then | if(flag[i] == 1) then | ||
-- <nowiki>{{#formtag:input|type="checkbox" value="data" name="list" id="data"}}{{#formtag:label|for="data"|data}}</nowiki> | -- <nowiki>{{#formtag:input|type="checkbox" value="data" name="list" id="data"}}{{#formtag:label|for="data"|data}}</nowiki> | ||
− | print('{{#form' .. 'tag:input|type="checkbox" value="' .. list[i] .. '" name="list" id="' .. list[i] .. checked .. ' | + | print('{{#form' .. 'tag:input|type="checkbox" value="' .. list[i] .. '" name="list" id="' .. list[i] .. '"' .. checked .. '}}{{#form' .. 'tag:label|for="' .. list[i] .. '"|' .. list[i] .. '}}<br>') |
else | else | ||
print(list[i] .. "<br>") | print(list[i] .. "<br>") |
Revision as of 22:18, 22 January 2009