Support Joomla!

Fri

09

May

2008

Nested forms explained
User Rating: / 5
PoorBest 
Written by Mostafa Muhammad   

Before I start I'll set 2 definitons to make things clearer

I'll use the word "User" to refer the frontend visitor who will be filling the forms , and I'll be using the word "Administrator" to refer to the backend component user who is actually creating forms.

We're all set to start, For this post I'll talk briefly on a feature I plan to implement Insha'Allah, which I call "Nested forms" (Not sure if this feature has another name :P )

This feature will allow forms that support One-To-Many relationships ,i.e. Creating a form where the user can include more than one instance of another form into his form.

 For example consider the following form structure, This simple form asks the user  to fill basic personal data and recent jobs 

  •  Name:
  •  Date of birth:
  •  Recent Jobs:
    •  Job I: 
      •  Position
      •  Start
      •  End 
    •  Job II:
      •  Position 
      •  Start
      •  End 
    •  Job III, Job IV ,  etc...
  •  Attached Files

Each record can have multiple "Job" entries, The component will allow the user  to add as much "Job" enteries as he likes, for a live example similar to what I plan to implement see the "Education background" section in following link

https://www.google.com/jobs/application/application_student

To illiustrate my preliminary idea on how it should work from Administrator point of view I'll describe a simple usage scenario

For the aforementioned example ,The administrator will first create a simple form called "Job" having 3 fields (Position,Start,End) and saves this form.

The administrator then creates another form called "CV Form" and adds fields for the "name", "date of birth",etc , The administrator also adds a Special "Embed form" field , the administrator will be able to configure that embed form field to point to whatever form he would like to embed , In this case the administrator will want to embed the "Job" form.

Please note that I'm viewing the idea from the end-user (User or Administrator) point of view, I'll go into more in-depth technical details  on my plan for implementation (developer point of view) in later posts.

What you see in this post "and the one before" are just preliminary ideas, I'm widely open for suggestions, criticism, comments and hate letters :P

 

 

1 Comments

  1. Wilco Jansen makes this comment

    Thanks for this introduction. You will have a killer extension for Joomla! 1.5 when you are able to finish this project, so please keep on blogging so we can follow your progression.

    Sun 11 May 2008 03:53:10 EDT

Add a Comment

Show other articles of this author