[eluser]brucebat[/eluser]
Hey all,
I am wanting to design a dynamic form that will have a logic like this.
This is pseudo code for what needs to be implemented
Code:
Get all rows in department table.
Display rows in pull down menu.
++When pull down item is selected -> display appropriate next part of form.
Get all rows from medical procedure table where deparment = selected deparment by the user
Display rows in a pull down menu
++When pull down item is selected -> display appropriate next part of form.
Get all rows from medical staff table where staff belong to that department
Display staff in pull down, with text box next to it which users can enter the quantity of staff
if staff pull down field completed
{
count = count + 1
Display another staff pull down menu with id="count" and text box with id="count"
}
else
{
break
}
++Display Events part (this is the really long and varying part of the form where the user has to enter a list of events with time , equipment used, and a comment if necessary
for (i=0, i>15, i++)
{
count= count +1
display a text field with pop out javascript time selector
get all rows from medical supplies and store them in a temporary array
display a text field for user comments
}
when user enters a string that is similar to specific medical supplies e.g. (user enters def, the form display a list of matching strings in the stored array of medical items[defribulator, etc], display it on list that can be selected to speed the users input.
if the user completes the last field add more events fields with count=count+1
I am using CI's form helper but I have no idea how to implement the rest does anyone have any links to documentation or sample code which would help.
I guess I will need to use scripting so if anyone knows any links for scripts that would be great too.
as well to implement it but I was wondering if CI has any features that I could use to speed up development for this form?
Thanks for your time!