Is it possible to set the datatype of a UserPref programmatically? I am trying to create a UserPref to show advanced gadget config options as follows:
<UserPref
name="opt1"
display_name="Option 1"
default_value="100"/>
<UserPref
name="opt2"
display_name="Option 2"
default_value="Default String"/>
<UserPref
name="adv"
display_name="Show Advanced Options?"
datatype="bool"
default_value="false"/>
<UserPref
name="advOpt1"
display_name="Advanced Option 1"
default_value=""
datatype="hidden"/>
With code in my gadget that, using Prefs.set, could set the datatype to the relevant type for the advanced options if adv==true. Is that possible or is there a way of doing this?