AI OnAI Off
Fixed it! Somehow....
Found another example using checkboxes here:
http://labs.episerver.com/en/Blogs/Paul-Smith/Dates/2008/9/Dynamic-Content-Examples/
Ended up copying the code to overwrite mine and it works fine now. I must of introduced a bug somewhere!
Ben
Hello,
I've been trying to use dynamic properties as per the article below:
http://world.episerver.com/en/Articles/Items/Farewell-EPiFields-Hello-Dynamic-Content/
To a certain extent it works fine. I cna select the dynamic property button in edit mode, select my 'ShowTime' property and check/uncheck the checkbox. The dynamic property shows on my page as expected.
However I can only show the property in a 'false' state. It dosent seem to matter what state the checkbox is in only the 'false' status is ever returned.
I've looked at the html behind the dynamic property and the state property only ever shows 'false' irrelevant of whether I've unchecked the box or not:
...class=dynamiccontent contentEditable=false style="BORDER-RIGHT: #111111 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #111111 1px solid; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; BORDER-LEFT: #111111 1px solid; PADDING-TOP: 3px; BORDER-BOTTOM: #111111 1px solid; BACKGROUND-COLOR: #f8eda4" disabled hash="xwNNIjH6RtZM20KoGePReBWcjy4NTyiWyu6Fen+CfAQ=" state="False" dynamicclass="ShowTime" classid="b30218a7-77fc-43dd-a844-81935aa9b35e" ...
The code that I use to retrieve this 'state' is as per the link above:
public string State
{
get{ return ShowTime.ToString();}
set{ ShowTime = Boolean.Parse(value);}
}
Interestingly if I click to view the dynamic property once its been added to my page the checkbox value is always set to selected by default!
Any ideas as I really need to be able to use this?
Thanks
Ben