Modify logic for forced inline-submit for more flexibility.