Just use the string split function on the newline character. The textarea will be saving the values as an Environment.NewLine / "/n" I believe so splitting on that should do the job
Yes, but where? Is there a step that I can hook into where the value is beeing saved? If I run the above example I get an error basically saying that the string can't be saved in a string[].
- Feb 24, 2021 13:16
Ah, I think you need to just change the type from String[] to String. The textarea is just a string value. You then split the string on the newline in your IsMatch method
I was thinking about that solution as well but thought that it might be too slow? How often is the IsMatch(..) called?
- Feb 24, 2021 13:21
Match on a Criterion is called every time the match is evaluated. A string split is a very low cost piece of code however so there should be no issue using that to split the values performance wise. If you want to store them individually you'd have to use a different dijit component such as the equivalent of a PropertyList but that's a bit overkill IMO
I would like to create a custom visitor group criterion that accepts a list of emails to be part of the group, how would I go about configuring that?
Something like this but there needs to be a step where the input string is split into separate email addresses.