Karsten
I'm new here

Possible to set hidden checkboxes?

Jump to solution

I want to set hidden checkboxes with a FS_Button.

It works fine, if the boxes are not hidden (hidden="no"). But if they are hidden, the changes aren't stored

//get selected gui value

        selectedValuesNew = formData.get(null,"cs_target").get(); //set

        // Update selected targets

        HashSet mappedTargetsNew = new HashSet();

        for(value:selectedValuesNew){

            mappedTargetsNew.add(optionModel.getOption(value.toString()));

        }

        if(mappedTargetsNew != null)

            targets_checkboxes.set(mappedTargetsNew);

<FS_BUTTON

          name="fs_targetbutton"

          hFill="no"

          noBreak="no"

          onClick="script:news_target_picker"

          style="button"

          useLanguages="no">

          <LANGINFOS>

            <LANGINFO lang="*" label="Set targets" description="TEXT"/>

            <LANGINFO lang="DE" label="Ziele setzen" description="TEXT"/>

          </LANGINFOS>

          <PARAMS>

            <PARAM name="targets_checkboxes">#field.cs_targetmapping</PARAM>

          </PARAMS>

        </FS_BUTTON>

Any ideas? thx

0 Kudos
1 Solution

Accepted Solutions
daniel2
I'm new here

hi karsten,

if you just want to hide the checkboxes in a form, put them in an extra form group and hide the complete form group with non-hidden checkboxes for all users except for e. g. admin users.

<ON_EVENT>

    <WITH>     

      <OR>

        <IN_GROUP name="Administrators"/>

        <IN_GROUP name="Developers"/>

      </OR>

    </WITH>

    <DO>

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

    </DO>

</ON_EVENT> 

maybe a solution for your uc.

cheers,

daniel

View solution in original post

0 Kudos
1 Reply
daniel2
I'm new here

hi karsten,

if you just want to hide the checkboxes in a form, put them in an extra form group and hide the complete form group with non-hidden checkboxes for all users except for e. g. admin users.

<ON_EVENT>

    <WITH>     

      <OR>

        <IN_GROUP name="Administrators"/>

        <IN_GROUP name="Developers"/>

      </OR>

    </WITH>

    <DO>

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

    </DO>

</ON_EVENT> 

maybe a solution for your uc.

cheers,

daniel

0 Kudos