rationalize code for wpsctPromptForCustomFields

This makes the code more readable, shorter and less error-prone