Hi Paul,

I'm using 2.1.7.  You may need to add a template to
forms-advanced-field-styling.xsl.  There is something for fi:field in
forms-field-styling.xsl:

<xsl:template match="fi:field[fi:styling/@type='hidden']" priority="2">
    <input type="hidden" name="{@id}" id="{@id}" value="{fi:value}">
      <xsl:apply-templates select="." mode="styling"/>
    </input>
  </xsl:template>


Gary

-----Original Message-----
From: Paul G. Joseph [mailto:[email protected]] 
Sent: Wednesday, October 16, 2013 10:41 AM
To: [email protected]
Subject: "hiding" a multiselect field widget

Hi there,

I have a form in Flow Script (Cocoon 2.1.11) with many different widgets.

I use this definition in two different form templates--in one I hide some
widgets, and in the other I hide some different ones.

All works well, except when I define a multi-select widget.

My definition seems pretty standard:
<fd:multivaluefield id="multi" required="false"> <fd:datatype
base="string"/> <fd:selection-list> <fd:item value=""/> <fd:item
value="cat"/> <fd:item value="dog"/> <fd:item value="mouse"/>
</fd:selection-list> </fd:multivaluefield>

I need to keep this widget on each of the two forms to preserve its value as
the user clicks between forms without needing to save it to the database
till they click a Save button.  In one form I need this widget to be
visible, but not on the other.

But it does not "hide" when I try to hide it using: <ft:widget id="multi"
><fi:styling type="hidden"/></ft:widget>

I tried with Firefox 23.0.1, IE8 and it makes no difference.

However, if in the form definition, I change the definition to an ordinary
list by replacing "multivaluedfield" by "field", then the styling command to
hide it works correctly.

Is this a known problem with the multi-select widget, and is there a
workaround?

Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to