Hello,
how can I define a validator for a field based on the value of other fields? E.g. I want to disable field2 if field1 has selected the option No.
Thx
Hello,
how can I define a validator for a field based on the value of other fields? E.g. I want to disable field2 if field1 has selected the option No.
Thx
I would use javascript to disable the second field based on an onchange event from the first field.
No variables, and no JSON
regards
Seán
Sean, the problem is that the name of the field is auto generated by Bonita. For example, when I use a select field the field is called pbSelect0. If I use in a row let’s say 2 select fields, then when the user adds the first row it is pbSelect0 and pbSelect1, for the next row pbSelect2 and pbSelect3, etc.
How do you suggest I do that?
I created a business object X that can have multiple instances of another business object Y. Y has multiple fields that I need to validate across. The UI designer auto-generated a nice form that allows me to add multiple instances of Y and populate the fields. The only thing missing is the validation aspect. Are you suggesting not to use any of this and to create the entire page via code?
This is btw Bonita 7 and UI designer. Also, the complication is that I am dealing with a repeating table. So using a variable and JSON expression will not help.
Right, in that case I would (and have done something similar for a different reason) create my table in code and not use the inbuilt (limited) table builder.
You could do this in a task step and send as a html variable or send the data as you do now and use a custom widget.
regards
It’s one way of doing it, the trouble is as you’ve figured out is the field names are autogenerated by Bonitasoft…I’ve generally found it to be the easiest way.
However how’s this for an idea…thinking about a possible solution.
How about adding a new field to the row which has the necessary HTML in it to do the work?
I know it’s not the real use of BDM but it might work…
regards