View Full Version : Adding section in form depending on user

12-17-2008, 05:30 AM
Good day to you all,
here i come again with a probably easy question for you but I can't find what i'm looking for.

What I have:
Simple form....

<input name="artist" value="Artist" />
<input name="country" value="Country" />

<input name="cd" value="Album" />
<input name="year" value="year" />
<input name="price" value="price" />


Have a link that would add a section into the form dynamicly with out reloading of the page. (add an album from this artist)

<input name="cd" value="Album" />
<input name="year" value="year" />
<input name="recorded" value="Recorded" />

Here is the twist, I need to be able if to add another section for DVD.
Different field is required for this...

<input name="DVD" value="DVD" />
<input name="year" value="year" />
<input name="where" value="where" />

I know there will be some JS and CSS but I think the core could be PHP.

Thanks for any help, I still searching, directions would be nice...

12-17-2008, 07:23 AM
Your question itself is kinda confusing, not very clear to ME. However as far as i understood you may accomplish this with Ajax or JS (DOM)

12-17-2008, 12:19 PM
I agree with lokeshshettyk; I don't really know what you're trying to do. How is adding the DVD different from adding the CD

12-17-2008, 06:07 PM
Well you need to explain more clearly but the sort of fetching and displaying based on selection concept can be seen here:


instead of showing the table and information you would spit out the select menu's you want for those specific categories.