Loading...

RE: Need to hide & unhide Tab control in Qlistform based on the value from drop down

RE: Need to hide & unhide Tab control in Qlistform based on the value from drop down

#5213
Anonymous
Anonymous
Participant

Hello,

  You can achieve this using Form Component Behavior.

I have defined 2 tabs

<FormLayout Type="TabLayout">

<Container Type="Tab" ID="Tab1" Label="Tab1" />

<Container Type="Tab" ID="Tab2" Label="Tab2" />

</FormLayout>

and placed some fields on both tabs. On Tab1 I have a lookup field called CountryID2 and I set the Form Component Behavior condition to hide Tab2 when the value selected is US

<FormComponentBehavior>

  <Component Type="Container" ID="Tab2">

    <HideWhen>

      <Eq>

        <FieldRef Name="CountryID2" />

        <Value Type="Lookup">US</Value>

      </Eq>

    </HideWhen>

  </Component>

</FormComponentBehavior>

This will hide the content of the tab2 when the value selected is equal to US.

Please don't forget to check the Auto Postback property of the CountryID2 field.

For more details please consult our documentation related to Form Component Behavior.(qListForm->Form component Behavior Section).