johni
I'm new here

FS5 rules: Hide form group by combobox value didn't work

I have a "CMS_INPUT_COMBOBOX" and a "CMS_GROUP". Now i want to set the visibility of the group depending on the Value og the combobox.

I created the following rule:

<RULES>

   <ON_EVENT>

        <WITH>

            <EQUAL>

                <PROPERTY source="global_gui_setting_gtf_mailtransport" name="VALUE"/>

                <TEXT>SMTP</TEXT>

            </EQUAL>

        </WITH>

        <DO>

            <PROPERTY source="#form.group_smtp" name="VISIBLE"/>

        </DO>

    </ON_EVENT>

</RULES>

But the rule didn't work and the group is always hidden. When i use a textbox instead of a combobox, it works.

This is the definition of my combobox:

<CMS_INPUT_COMBOBOX

        name="global_gui_setting_gtf_mailtransport"

        allowEmpty="no"

        hFill="no"

        length="10"

        singleLine="yes"

        useLanguages="no">

        <ENTRIES>

          <ENTRY value="MAIL">

            <LANGINFOS>

              <LANGINFO lang="*" label="PHP mail()"/>

            </LANGINFOS>

          </ENTRY>

          <ENTRY value="SMTP">

            <LANGINFOS>

              <LANGINFO lang="*" label="SMTP server"/>

            </LANGINFOS>

          </ENTRY>

        </ENTRIES>

        <LANGINFOS>

          <LANGINFO lang="*" label="Mail transport handler"/>

        </LANGINFOS>

      </CMS_INPUT_COMBOBOX>

So, is there something wrong with my rule or FS5?

0 Kudos
1 Reply
StefanSchulz
I'm new here

Hi,

Yes, there is something wrong. The property VALUE does not return plain text for a Combobox but its value (which is of type option). Depending on the version of FS you are using (should be past 5.0.108), the property named ENTRY will provide what you need.

Cheers,

Stefan

0 Kudos