You can use the drop down data type to accomplish this.
Step 1: go to the developer section
Step2: right click on the data types and click create give your new data type a name e.g. "date drop down"
Step 3: in your new data type choose "Drop down list" from the render control. click save
Step 4: Choose "Ntext" from the Database data type drop down menu.
Step 5: For each value you want to be available from the drop down menu add in a value in the "add pre value" input. and click save to add a new row.
Step6: Go to the settings section, and navigate to the document type you wish to add this new data type to.
Step 7: add the new dat type as a property of this document type.
In the content section you will now have a drop down menu with these values available. Im not sure what the XML output for this data tpye is like but if you use some XSLT to output a copy of the XML for this property it should be pretty straight forward.
There are a couple of other ways you could acheive this to make it more felxible but this should be the simplest way to acheive what you are looking for.
show content when select an item from dropdown list
dear,
im new in umbraco. and my expectation is as follows-
In a content page i need a dropdown list, which contain item .i.e.,
select any one
--1970
--1980
--1990
when i select 1970, then it display its value or text on same page. and same for 1980,1990 etc.
So, how can i add year and its value or text and where ?
note: please any one help me as soon as possible step by step.
regard,
touhid, dhaka, bangladesh
Hi Touhid,
You can use the drop down data type to accomplish this.
Step 1: go to the developer section
Step2: right click on the data types and click create give your new data type a name e.g. "date drop down"
Step 3: in your new data type choose "Drop down list" from the render control. click save
Step 4: Choose "Ntext" from the Database data type drop down menu.
Step 5: For each value you want to be available from the drop down menu add in a value in the "add pre value" input. and click save to add a new row.
Step6: Go to the settings section, and navigate to the document type you wish to add this new data type to.
Step 7: add the new dat type as a property of this document type.
In the content section you will now have a drop down menu with these values available. Im not sure what the XML output for this data tpye is like but if you use some XSLT to output a copy of the XML for this property it should be pretty straight forward.
There are a couple of other ways you could acheive this to make it more felxible but this should be the simplest way to acheive what you are looking for.
Hope this helps
Lachlann
Hi
thanks for reply but i cant do it. can you help me what is xml code ?
touhid
sory for not xml code. it will be what are xslt code for this problem?
is working on a reply...