Possible to set hidden checkboxes?
Author: Karsten
Publication Date: 3/14/2014 7:57
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
-
Author: daniel2 - 3/18/2014 14:04
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
Please sign in to leave a comment.
Comments
1 comment