JS: Make fields not-mandatory based on user selection?
Posted: 16 Feb 2018
Hey guys,
I'm fairly new to the form designer and new to coding, but I was wondering if there was a simple code solution to this problem.
I have a 3 tab onboarding form. One tab contains general info, so the persons name address etc, one tab for contractor info, and one tab for employee info. No person can be an employee AND contractor at the same time, but I would still like to enforce mandatory fields within the individual tabs.
My idea is to have a question in the general info tab saying "Contractor or Employee", and when contractor is selected, the employee tab is no longer relevant and the mandatory field checks INSIDE the employee tab are no longer checked on submit. This would mean the form would still be dummy proof (enabled mandatory fields within each section), but more optimized.
Does the API include some way to do this in javascript?
Any ideas would be much appreciated
Thanks-David C
I'm fairly new to the form designer and new to coding, but I was wondering if there was a simple code solution to this problem.
I have a 3 tab onboarding form. One tab contains general info, so the persons name address etc, one tab for contractor info, and one tab for employee info. No person can be an employee AND contractor at the same time, but I would still like to enforce mandatory fields within the individual tabs.
My idea is to have a question in the general info tab saying "Contractor or Employee", and when contractor is selected, the employee tab is no longer relevant and the mandatory field checks INSIDE the employee tab are no longer checked on submit. This would mean the form would still be dummy proof (enabled mandatory fields within each section), but more optimized.
Does the API include some way to do this in javascript?
Any ideas would be much appreciated
Thanks-David C