Arc Forumnew | comments | leaders | submitlogin
1 point by jnl 4327 days ago | link | parent

Interestingly, you can control which binding is passed to which transaction. Let's say you wanted to show the form twice, and display the answers in reverse order. So something like this:

Display the form to collect answer1 (still named foo), on submit display the form again to collect answer2 (also named foo), then the "click here" page, then a page with "you said: [answer2]" and a "click here" link, then a page with "you said: [answer1]".

How do you do that in Arc? In this Ruby example, it would be:

  def said
    aform(input("foo"), submit) {
      aform(input("foo"), submit) {
        msg = "you said: #{arg :foo}"
        w_link("click here") {
          "you said: #{arg :foo}<br />" + w_link("click here") {
          msg}}}}
  end