https://bugzilla.wikimedia.org/show_bug.cgi?id=47147

       Web browser: ---
            Bug ID: 47147
           Summary: Hidden 'holds template' field not hidden
           Product: MediaWiki extensions
           Version: REL1_20 branch
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: SemanticForms
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

I have a "embed in field" template that has a single dropdown field that is
used to "show on select" certain div sections each containing the same "for
template|templateName" except with different fields but all contain a "holds
template|hidden" field to hold the value of the dropdown and used in the
template later.  

The problem is the dropdown template prints it's value into the free-text
section for all of the hidden divs (hidden because the dropdown does not
select/show them).  Each edit prints a new set of dropdown values and they
interfere with the form display if the dropdown is ever changed not to mention
outputting to the page itself.

Here is the simplified code:

Form
====

<div class="create-form-section-inner" id="journal-article-form">
{{{for template |CreateRefObject |sourceType={{SusFormType |sourcetype}} }}}
===Cite Journal Article===
{{{field |sourceType |holds template |hidden}}}
{| 
! | Author*:
| {{{field|journal-author}}} 
|}
{{{end template}}}
</div>

<div class="create-form-section-inner" id="news-article-form">
{{{for template |CreateRefObject |sourceType={{SusFormType |sourcetype}} }}}
===Cite News Article===
{{{field |sourceType |holds template |hidden}}}
{| 
! | News Author*:
| {{{field|news-author}}} 
|}
{{{end template}}}
</div>

{{{for template |SusFormType |embed in field=CreateRefObject[sourceType]
|label=Source Type}}}
{|
! Select the type of source to cite*:
|{{{field|sourcetype|input type=dropdown |default=News Article |values=News
Article, Journal Article,Video |show on select=News Article=>news-article-form;
Journal Article=>journal-article-form; Video=>video-form|mandatory }}}
|}
{{{end template}}}


SusFormType Template
====================
<noinclude>
Description...
</noinclude><includeonly>{{{sourcetype|}}}</includeonly>


The documentation doesn't have any examples on how to use "embed in field" and
related parameters, so I could be using them wrong, but everything works except
for the combo value printouts and also it seems like if a field is declared
hidden, then it should not be printing anything out on the page.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to