radio buttons throw away inputs when validation fails

entity Person {
  name    :: String
}

var p1 := Person{ name := "1" }
var p2 := Person{ name := "2" }
var p3 := Person{ name := "3" }
var p4 := Person{ name := "4" }

entity User {
  name :: String
  person1 -> Person
  person2 -> Person
  validate(person1 == null || person1 != person2, "cannot choose same person")
}

var u1 := User{ name := "u1" }
var u2 := User{ name := "u2" }

define page test2(){
  form{
    for(u:User){
      radio(u.person1,from Person)[style="margin-left:20px;"]
      radio(u.person2,from Person)[style="margin-left:20px;"]
    } separated-by{<br />}
    submit action{} {"save"}
  }
}
Submitted by Danny Groenewegen on 1 November 2010 at 13:51

On 1 November 2010 at 14:17 Danny Groenewegen closed this issue.

Log in to post comments