Basically you should save the category ids in a different format, when saving where to display the form. Now you get one number, but instead you could use something like 1:2, explode this text in posthasteDisplayCheck function, and check, if current displayed category fits your needs.