Quote:
Originally Posted by davidfor
I assume that is a regex. If so, you will need to escape the square brackets. Add a backslash in before them.
|
As @davidfor pointed out, you should escape the brackets. Also the new inlist keyword can be used instead of list_contains() function:
Code:
program:
k = field('#kobocoll');
if check_yes_no('#onkobo', 0, 1, 0) then 'sync.png'
elif check_yes_no('#onkobo', 0, 0, 1) then
if '^\[Kobo Store\]$' inlist k then 'drm-locked.png'
elif '^\[Send to Device\]$' inlist k then 'sync.png'
else 'reader.png'
fi
fi