dynamic populate of drop down with data from your inserted nodes
Hi, I am new to umbraco, I want to create dropdown list which contains name of the node which i created in content tree. My problem is i have some categories which i want to show in dropdownlist. I will create a node for each categories. under each category node i will have subnodes which will have propety called question. When i select a category in drop down it should display all questions . Is it possible to do this. if possible please focus light on this. Earlier reply will be appreciated.
will create a dropdown list of categories from the nodes (starting from a $startNode - set to -1 here = top level node). All that needs to be done now is display all questions upon selectnig a category from the dropdown.
Hi Dirk, thanks for the quick reply. I alredy did the same thing for populating dropdown but how can i handle postback for this i mean once i select a category how will i show the questions of that category. In the content tree there will be many content node which will have a property called question for each category.
If I'm reading your question correctly you have a page with a dropdown box on it with some questions in it. When you select a question the answers should be shown.
Now there are a few way you can show the answers, either redirect to a page with the relevant answers when you select a question.
In the value attribute of the different options add the url to the answers page, and then just redirect to that page.
Another way is to submit to the same page with a query parameter containing the id of the question asked and then show the children of that node with xslt
Hi Jannik, the solution you gave is really corrrect way of implementation and its working. but i already have one master page in which i took the form tag. and my funcionality in in content page in which i can not take the form tag. can you suggest some solution for this?
dynamic populate of drop down with data from your inserted nodes
Hi, I am new to umbraco, I want to create dropdown list which contains name of the node which i created in content tree. My problem is i have some categories which i want to show in dropdownlist. I will create a node for each categories. under each category node i will have subnodes which will have propety called question. When i select a category in drop down it should display all questions . Is it possible to do this. if possible please focus light on this. Earlier reply will be appreciated.
Thanks in advance
Suvarna
Suvarna,
Can be done quite easily using xslt (and macro)
will create a dropdown list of categories from the nodes (starting from a $startNode - set to -1 here = top level node). All that needs to be done now is display all questions upon selectnig a category from the dropdown.
Hope this helps.
Regards,
/Dirk
Hi Dirk, thanks for the quick reply. I alredy did the same thing for populating dropdown but how can i handle postback for this i mean once i select a category how will i show the questions of that category. In the content tree there will be many content node which will have a property called question for each category.
Thanks,
Suvarna
If you're going to use xslt then your best bet would be to post back via javascript. Something like this: document.formName.submit()
Hi jannik, I am not clear about this point. can you please elaborate this point in more deep?
Thanks,
Suvarna
You can see this link the way i want to do for dropdown control
http://www.atagverwarming.nl/default.aspx?cp=faq
If I'm reading your question correctly you have a page with a dropdown box on it with some questions in it. When you select a question the answers should be shown.
Now there are a few way you can show the answers, either redirect to a page with the relevant answers when you select a question.
In the value attribute of the different options add the url to the answers page, and then just redirect to that page.
Another way is to submit to the same page with a query parameter containing the id of the question asked and then show the children of that node with xslt
You may also want to read -> http://our.umbraco.org/forum/developers/xslt/5110-Drop-down-filter-using-XSLT
Try somethig like this, it's not tested so errors might occur :)
Hi Jannik, the solution you gave is really corrrect way of implementation and its working. but i already have one master page in which i took the form tag. and my funcionality in in content page in which i can not take the form tag. can you suggest some solution for this?
Thanks,
Suvarna
just use: document.forms[0].submit()
Hi,
Im confused about @id.can you help me?
touhid
is working on a reply...