I have an application which is divided mainly into three phases.
- Planning
- Implementation
- Post-Implementation
In each of these phases there are multiple occurrences for a same activity but under different conditions. For instance, in each of these phases there will be several different meetings. Each meeting is meant to collect different data. If one meeting is intended to collect cash details, the other meeting is held to gather the information related to the progress of the project. So I have decided to provide a provision to dynamically create form & form elements. There will be a section like Create Forms
in the application where some form elements will be defined. So the user can select only the required form elements necessary to create the form and save it under a name for later use. The main issue that I'm facing with such a solution is the validation between the dynamically created form fields.
ie,
Consider, there are 3 form elements. One selectbox and two textboxes namely TextboxA
and TextboxB
.
The selectbox refers to the meeting type.
<select>
<option value="">-- select --</option>
<option value="1">Cash Collection</option>
<option value="2">Progress Evaluation</option>
.
.
.
</select>
In a dynamically created form how can I impose a condition like showing only the TextboxA
when the meeting type Cash Collection
is selected and showing both the textboxes when the meeting type Progress Evaluation
is selected.