@
@
@phgrey2011-06-09 16:51:28
PHP
@phgrey, 2011-06-09 16:51:28

PHP. tree form?

Khabravchane, tell me how to ask the right question.
The task is as follows - you need to create a form consisting of selects.
The content of the lower selects depends on what was selected first.
Ideally, not only the content of the selects depends on this, but also their number, the display of some and the hiding of others.
The result is a kind of "decision tree" - if I'm not mistaken, this is called an open (non-closed) graph in mathematics.
So the real question is, what is the name of this form? (What to google?)
"Tree form", "dynamic form" did not lead to the desired result.
I'm sure that I'm not the first to be faced with such a task, but to my shame I can't formulate the question correctly.
And if there are links to some solutions - generally super, I will be obliged to the grave of my life.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
Grigory Peretyaka, 2011-06-09
@Peretyaka

There is an article " Cascade of drop-down lists ".
The name doesn't matter though. Here or in php with page reload or in JS. Both are pretty easy to do with standard tools.

X
xaker1, 2011-06-09
@xaker1

You need JavaScript. Possibly with ajax (if you want to choose which elements to show / not show next, give the php script).
Example - www.tigir.com/javascript_select.htm

P
phgrey, 2011-06-09
@phgrey

By the way, if anyone is interested - there is something similar on .NET - www.asp.net/ajax/ajaxcontroltoolkit/samples/CascadingDropDown/CascadingDropDown.aspx

I
impass, 2011-06-16
@impass

And what about PHP in general? %)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question