If you look at the scaladaoc for OptionalStringField, there are two methods that are provided through the superclass SettableValueHolder
and that provide access to the underlying value: get
and set
def set (in: Option[MyType]) : Option[MyType]
Set the value of the field to the given value. Note: Because setting a field can fail (return non-Full), this method will return defaultValueBox if the field could not be set.
get : Option[MyType]
get the value
I suspect something like this should work for you:
override def toForm = Full(SHtml.select(List(("usa", "usa"),("ca", "ca")), get, v => set(Some(v)) ))