Updated to allow selecting layouts instead of just entering the value