RajHelaiya
6 years agoQrew Captain
Hide and show multiple fields on a form based on conditions using Java Script.
Below is my scenario:
I have 2 tables Course and Enrollment.
Course table contains Course name, number of activities, assessment method(total 10 text fields) and course description.
Enrollment contains 2 Pass or fail field (dropdown) and a date field for one assessment method field.
So for every Assessment method field there are 2 passfail and date fields. (total 20)
Enrollment and course are connected in such a way that many enrollments belong to one course.
I need to show or hide these pass fail and date fields based on number of activities field in course. When a course name is selected from a drop down, number of activities is also displayed as a lookup field.
Example: for number of activities =3
show Assesment method 1 , 2 and 3
show pass fail 1 ,2,3,4,5 and 6
show date 1 ,2,3,4,5 and 6
hide assessment method 4 to 10
hide pass fail 7 to 20
hide date 7 to 20.
Can anyone please help to resolve this?
I have 2 tables Course and Enrollment.
Course table contains Course name, number of activities, assessment method(total 10 text fields) and course description.
Enrollment contains 2 Pass or fail field (dropdown) and a date field for one assessment method field.
So for every Assessment method field there are 2 passfail and date fields. (total 20)
Enrollment and course are connected in such a way that many enrollments belong to one course.
I need to show or hide these pass fail and date fields based on number of activities field in course. When a course name is selected from a drop down, number of activities is also displayed as a lookup field.
Example: for number of activities =3
show Assesment method 1 , 2 and 3
show pass fail 1 ,2,3,4,5 and 6
show date 1 ,2,3,4,5 and 6
hide assessment method 4 to 10
hide pass fail 7 to 20
hide date 7 to 20.
Can anyone please help to resolve this?