Hi,
I have a checkbox, and depending on whether it is filled in, I want to show a multi-text field with a table.
The hiding and showing works, but the setFormValue does not work with the carriage returns for the table.
I tried already with &&'\n'&&, but then the text is filled with 'true'.
So this is my behaviour server side script on the checkbox field called cosmetics:
def cosmetics = getFieldById("customfield_18787")
def cosmeticstable = getFieldById("customfield_18788")
cosmeticstable.setHidden(true);
if(cosmetics.value != null){
cosmeticstable.setHidden(false);
cosmeticstable.setFormValue('|| ||Prep.||PI.Prod.||Press||Labo||Eval||Description||
||Coating quality| | | | | | |
||Scuffs - pinholes| | | | | | |
||Substrate quality| | | | | | |
||Visual control| | | | | | |')
}
OK, I found it. It was just \n without quotes, so:
def cosmetics = getFieldById("customfield_18787")
def cosmeticstable = getFieldById("customfield_18788")
cosmeticstable.setHidden(true);
if(cosmetics.value != null){
cosmeticstable.setHidden(false);
cosmeticstable.setFormValue('|| ||Prep.||PI.Prod.||Press||Labo||Eval||Description||\n||Coating quality| | | | | | |\n||Scuffs - pinholes| | | | | | |\n||Substrate quality| | | | | | |\n||Visual control| | | | | | |')
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.