Hi,
Is the condition attribute of a rows tag in a Panel () only supported in Specify 7?
Is there a way to do conditional rendering in Specify 6?
Thanks,
Soraya
Specify 6 does indeed support conditional rendering. This is used on an Agent form to display a different form depending on agent type:
<view name="Agent"
class="edu.ku.brc.specify.datamodel.Agent"
resourcelabels="false">
<desc><![CDATA[Agent subform within the AccessionAgent form.]]></desc>
<altviews defaultmode="view" selector="agentType">
<altview name="Organization View" viewdef="Organization" mode="view" selector_value="0"/>
<altview name="Agent View" viewdef="Agent" mode="view" selector_value="1"/>
<altview name="Organization Edit" viewdef="Organization" mode="edit" selector_value="0"/>
<altview name="Agent Edit" viewdef="Agent" mode="edit" selector_value="1" default="true"/>
</altviews>
</view>
(see selector
and selector_value
in the above example)
Also, I should warn that the Specify 7 documentation you see for conditional form rendering (Form System · specify/specify7 Wiki · GitHub) is describing a yet-to-be releases feature (it’s already implemented, but will be released once it is sufficiently tested).
Thanks for the explanation and the warning. This is interesting functionality. Looking forward to trying it.